From 3e72bfa56c860826429a842f6c128d78d4a930db Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 1 Jun 2017 19:47:08 -0400 Subject: react-native-web port of fmf app --- client/src/lib/components/checkbox.js | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 client/src/lib/components/checkbox.js (limited to 'client/src/lib/components/checkbox.js') diff --git a/client/src/lib/components/checkbox.js b/client/src/lib/components/checkbox.js new file mode 100644 index 0000000..ea4ab7e --- /dev/null +++ b/client/src/lib/components/checkbox.js @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import { + View, + Image, + StyleSheet, +} from 'react-native' + +import ClearText from './text' + +export default class CheckBox extends Component { + render() { + const image = this.props.checked ? ( + + ) : ( + + ) + return ( + this.props.onChange(this.props.checked)}> + {image} + {this.props.label} + + ) + } +} + +const styles = StyleSheet.create({ + row: { + flexDirection: 'row', + }, + image: { + width: 30, + height: 30, + marginRight: 5, + } +}) -- cgit v1.2.3-70-g09d2