class Toggle extends Component { static propTypes = { defaultOn: PropTypes.bool, on: PropTypes.bool, onToggle: PropTypes.func, children: PropTypes.oneOfType([ PropTypes.func, PropTypes.array ]).isRequired, } static defaultProps = { defaultOn: false, onToggle: () => {}, } }