aretherecookies-mobile/js/components/CheckBox.js
Bart Akeley acd4015848 Filter modal implementation
- Orderby picker
- Radius picker
- Checkbox styling in ui-theme
- handlers for cancel and apply
2017-11-12 13:06:57 -06:00

20 lines
536 B
JavaScript

// @flow
import React from 'react';
import { TouchableOpacity } from 'react-native';
import { Icon } from 'react-native-material-ui';
type Props = {
checked?: boolean,
onChange?: (checked: boolean) => void,
style?: { [string]: string | number },
};
const CheckBox = ({ checked, onChange, style }: Props) => {
return (
<TouchableOpacity onPress={() => onChange && onChange(!checked)}>
<Icon glyph={checked ? 'checkbox-marked' : 'checkbox-blank-outline'} style={style} />
</TouchableOpacity>
);
};
export default CheckBox;