/* @flow */ import * as React from 'react'; import { View, StyleSheet } from 'react-native'; import { Paragraph, RadioButton, Colors, TouchableRipple, withTheme, } from 'react-native-paper'; import type { Theme } from 'react-native-paper/types'; type Props = { theme: Theme, }; type State = { checked: 'normal' | 'custom', }; class RadioButtonExample extends React.Component { static title = 'Radio Button'; state = { checked: 'normal', }; render() { const { theme: { colors: { background }, }, } = this.props; return ( this.setState({ checked: 'normal' })}> Normal this.setState({ checked: 'custom' })}> Custom Checked (Disabled) Unchecked (Disabled) ); } } const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: Colors.white, paddingVertical: 8, }, row: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', paddingVertical: 8, paddingHorizontal: 16, }, }); export default withTheme(RadioButtonExample);