mirror of
https://gitlab.com/wheres-the-tp/ui-mobile.git
synced 2026-01-25 09:34:56 -06:00
- Orderby picker - Radius picker - Checkbox styling in ui-theme - handlers for cancel and apply
20 lines
536 B
JavaScript
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;
|