CheckableBox

import React from 'react';
import { CheckableBox } from 'seduo-ui';

const Example = (props) => (
    <div>
        <CheckableBox checked={false}>
            <span className="my-7">Text unchecked</span>
        </CheckableBox>
        <CheckableBox checked>
            <span className="my-7">Text Checked</span>
        </CheckableBox>
        <CheckableBox checked block checkboxPosition="right-middle">
            <span className="d-block m-7">Text Checked block</span>
        </CheckableBox>
    </div>
);

export default Example;

Properties

type Props = {|
    className: string,
    onClick: Function,
    children: Node,
    checked: boolean,
    block: boolean,
    checkboxPosition: 'right-top' | 'right-middle',
|};

CheckableBox.defaultProps = {
    className: '',
    checked: false,
    block: false,
    onClick: () => undefined,
    checkboxPosition: 'right-top',
};