ToggleButton.Group
Toggle group allows to control a group of toggle buttons.
Usage
import * as React from 'react';
import { View } from 'react-native';
import { ToggleButton } from 'react-native-paper';
export default class MyComponent extends React.Component {
state = {
value: 'left',
};
render() {
return(
<ToggleButton.Group
onValueChange={value => this.setState({ value })}
value={this.state.value}
>
<ToggleButton icon="format-align-left" value="left" />
<ToggleButton icon="format-align-right" value="right" />
</ToggleButton.Group>
)
}
}