aboutsummaryrefslogtreecommitdiff
path: root/src/components/common/RadioCheckbox.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/common/RadioCheckbox.tsx')
-rw-r--r--src/components/common/RadioCheckbox.tsx40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/components/common/RadioCheckbox.tsx b/src/components/common/RadioCheckbox.tsx
new file mode 100644
index 00000000..33d50527
--- /dev/null
+++ b/src/components/common/RadioCheckbox.tsx
@@ -0,0 +1,40 @@
+import React from 'react';
+import {
+ View,
+ StyleSheet,
+ TouchableOpacity,
+ TouchableOpacityProps,
+} from 'react-native';
+
+interface RadioCheckboxProps extends TouchableOpacityProps {
+ checked: boolean;
+}
+const RadioCheckbox: React.FC<RadioCheckboxProps> = (props) => {
+ return (
+ <TouchableOpacity {...props}>
+ <View style={styles.outerCircle}>
+ {props.checked && <View style={styles.innerCircle} />}
+ </View>
+ </TouchableOpacity>
+ );
+};
+
+const styles = StyleSheet.create({
+ outerCircle: {
+ width: 23,
+ height: 23,
+ borderRadius: 11.5,
+ borderWidth: 1,
+ borderColor: '#fff',
+ alignItems: 'center',
+ justifyContent: 'center',
+ },
+ innerCircle: {
+ width: 17,
+ height: 17,
+ borderRadius: 8.5,
+ backgroundColor: '#04ffff',
+ },
+});
+
+export default RadioCheckbox;