Version: 0.0.10.0.2-5.1-2017081603470.0.20.0.30.0.40.0.50.0.60.0.70.0.80.0.90.0.100.0.110.0.120.0.130.0.140.0.150.0.160.0.170.0.180.0.190.0.20-2017081515490.0.20-201708151549-2017081515500.0.20-201708151549-201708151550-201708151550-2017081602320.0.20-201708151549-201708151550-201708151550-201708160232-2017081602330.0.200.0.21-2017081602490.0.21-201708160249-2017081602490.0.21-201708160249-201708160249-2017081602490.0.21-201708160249-201708160249-201708160249-2017081602490.0.22-2017081603170.0.22-201708160317-2017081603170.0.220.0.23-2017081603200.0.230.0.24-2017081603410.0.25-2017081603450.0.26-2017081603510.0.260.0.27-2017081613180.0.270.0.280.0.29-201708170714350.0.29-test0.0.290.0.30-201708170806280.0.30-201708170835370.0.30-201708170849290.0.30-201708170920110.0.30-201708170929220.0.30-201708171000290.0.30-201708171101580.0.30-201708171111170.0.30-201708171239480.0.30-201708172033560.0.300.0.31-201708181434500.0.31-201708181510060.0.310.0.32-201708181623070.0.32-201708181703320.0.320.0.33-201708181709040.0.330.0.34-201708231703200.0.34-201708242200020.0.34-201708242214560.0.34-201708242218470.0.340.0.35-201708311249180.0.350.0.36-201708311438370.0.360.0.37-201708311644180.0.370.0.38-201708312028530.0.38-201709011133300.0.38-201709011146390.0.38-201709011151380.0.38-201709011153330.0.38-201709011200370.0.38-201709011203440.0.38-201709011209070.0.38-201709011209530.0.38-201709011211390.0.38-201709011215480.0.38-201709071356540.0.38-201709071401420.0.38-201709071408110.0.38-20170901114639-201709011147140.0.380.0.390.0.40-201709062044510.0.40-201709111452010.0.40-201709151213500.0.40-201709152139100.0.40-201709181059420.0.40-201709191020540.0.400.0.41-201709191512320.0.410.0.42-201709192329140.0.420.0.43-201709201159540.0.430.0.44-201709221826400.0.440.0.45-201709231734360.0.45
import React, {
PropTypes,
} from 'react';
import {
Text, View,
} from 'react-native';
function Checkbox({
checked,
}) {
return (
<View style={Checkbox.Style[checked ? 'active' : 'normal']}>
{checked && (
<View style={Checkbox.Style.check} />
)}
</View>
);
}
Checkbox.propTypes = {
checked: PropTypes.bool,
};
Checkbox.defaultProps = {
checked: false,
Checkbox.Style = {
normal: {
width: 16,
height: 16,
borderRadius: 8,
borderWidth: 1,
borderColor: '#9c9c9c',
},
active: {
backgroundColor: '#fc5100',
alignItems: 'center',
justifyContent: 'center',
check: {
width: 9,
height: 6,
borderLeftWidth: 1,
borderBottomWidth: 1,
borderColor: '#fff',
transform: [
{ translateY: -2 },
{ rotate: '-44deg' },
],
export default Checkbox;