From 5cf454c6800d6bfe26e08c6b4393b82bff442b4d Mon Sep 17 00:00:00 2001 From: Maksymilian Jopek Date: Thu, 3 Mar 2022 22:57:17 +0100 Subject: Initial commit - v1.0.0 --- components/RadioButton.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 components/RadioButton.js (limited to 'components/RadioButton.js') diff --git a/components/RadioButton.js b/components/RadioButton.js new file mode 100644 index 0000000..4c178e2 --- /dev/null +++ b/components/RadioButton.js @@ -0,0 +1,56 @@ +import * as React from 'react'; +import { StyleSheet, View, TouchableOpacity, Text } from "react-native"; + +export default class RadioButton extends React.Component { + constructor(props) { + super(props); + this.state = { + value: props.value ?? true, + contStyle: props.style ?? {}, + onClick: props.onClick, + label: props.label, + } + } + + render() { + return ( + + + + + {this.state.label} + + ) + } +} + +const styles = StyleSheet.create({ + contStyle: { + flexDirection: "row", + marginTop: 10, + }, + label: { + marginLeft: 15, + marginTop: 3, + fontSize: 17, + fontWeight: "bold", + color: "white", + }, + outer: { + borderColor: "#EB1F63", + borderWidth: 2, + borderRadius: 20, + width: 30, + height: 30, + }, + inner: { + borderColor: "#EB1F63", + borderWidth: 10, + borderRadius: 20, + width: 20, + height: 20, + top: 3, + left: 3, + }, +}) + -- cgit v1.3.1