React Checkbox using Typescript

This is a react based checkbox component developed using Typescript.

Snapshot

Snapshot of Checkboxes

Features

interface Props extends React.Props<Checkbox> {
    label : string;
    style: any;
    defaultChecked?: boolean;
    checkedIcon?: any;
    uncheckedIcon?: any;
};

Usage

Basic:

const styles = {
  checkbox: {
    marginBottom: 16
  }
};
<Checkbox label="Simple" style={styles.checkbox}/>

The above example demonstrates the following:

Further Customization

const styles = {
  checkbox: {
    marginBottom: 16
  }
};
<Checkbox label="Custom icon" style={styles.checkbox} uncheckedIcon={} checkedIcon={} />

The above example demonstrates the following:

To install dependencies

npm install

To run in development mode

npm start

To build the pages

npm run build

Contributing

Contributions are always welcome. Just send a pull request. Feel free to contact me GitHub.

License

MIT License