RadioButton

Radio buttons helps to implement selection between multiple options, on the low level it uses TouchableOpacity of React-Native

checkbox
checkbox

Usage

import { RadioButton } from 'frontatish';
<RadioButton
value="selected"
onPress={() => void}
selected={true}
/>;

Props

value

The value of radio button

TypeDefaultRequired
string None Yes

selected

Flag which helps to mark radio button selected or not

TypeDefaultRequired
boolean false Yes

onPress

Callback function which sets the selected value in the parent state

TypeDefaultRequired
function NoneYes

size

you can control the size of the checkbox and the icon inside by using this props

TypeDefaultRequired
enum('sm', 'md', 'lg') 'sm' No

disabled

Flag to decide whether to disable the press on radio button or not

TypeDefaultRequired
boolean false No

disabledStyle

Coming soon!!

containerStyle

A react native View style object which gives flexibility to alter the styles of radio-button container

TypeDefaultRequired
ViewStyle none No

labelStyle

A react native Text style object which gives flexibility to alter the styles of label of the radio-button

TypeDefaultRequired
TextStyle none No

customLabel

A react component to render a custom label for your radio button

TypeDefaultRequired
JSX.Element none No