import React from 'react'; import ImmutablePureComponent from 'react-immutable-pure-component'; import PropTypes from 'prop-types'; import { v4 as uuidv4 } from 'uuid'; export class SimpleForm extends ImmutablePureComponent { static propTypes = { children: PropTypes.node, onSubmit: PropTypes.function, } render() { const { children, onSubmit } = this.props; return (
{children}
); } } export class FieldsGroup extends ImmutablePureComponent { static propTypes = { children: PropTypes.node, } render() { const { children } = this.props; return (
{children}
); } } export class Checkbox extends ImmutablePureComponent { static propTypes = { label: PropTypes.string, checked: PropTypes.bool, onChange: PropTypes.func, } static defaultProps = { checked: false, } render() { const { label, checked, onChange } = this.props; const id = uuidv4(); return (
); } }