MCPcopy Create free account
hub / github.com/Lobos/react-ui / FormSubmit

Function FormSubmit

src/FormSubmit.js:6–25  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

4import Button from './Button';
5
6const FormSubmit = (props) => {
7 let children = props.children;
8 let content;
9 if (Array.isArray(children)) {
10 content = props.disabled ? children[1] : children[0];
11 } else {
12 content = children;
13 }
14
15 return (
16 <div style={props.style} className="rct-control-group">
17 <Button type="submit"
18 status="primary"
19 onClick={props.onClick}
20 disabled={props.disabled}>
21 {content}
22 </Button>
23 </div>
24 );
25}
26
27FormSubmit.propTypes = {
28 children: PropTypes.any,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…