(props)
| 4 | import Button from './Button'; |
| 5 | |
| 6 | const 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 | |
| 27 | FormSubmit.propTypes = { |
| 28 | children: PropTypes.any, |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…