docs: rename RadioGroup to RadioButtonGroup and fix docs

This commit is contained in:
Satyajit Sahoo
2018-03-18 18:44:30 +01:00
parent 959582ed9e
commit 505d58d65d
6 changed files with 42 additions and 43 deletions

View File

@@ -14,7 +14,7 @@ import FABExample from './FABExample';
import PaperExample from './PaperExample';
import ProgressBarExample from './ProgressBarExample';
import RadioButtonExample from './RadioButtonExample';
import RadioGroupExample from './RadioGroupExample';
import RadioButtonGroupExample from './RadioButtonGroupExample';
import RippleExample from './RippleExample';
import SearchBarExample from './SearchBarExample';
import SwitchExample from './SwitchExample';
@@ -39,7 +39,7 @@ export const examples = {
paper: PaperExample,
progressbar: ProgressBarExample,
radio: RadioButtonExample,
radioGroup: RadioGroupExample,
radioGroup: RadioButtonGroupExample,
ripple: RippleExample,
searchbar: SearchBarExample,
switch: SwitchExample,

View File

@@ -5,7 +5,7 @@ import { View, StyleSheet } from 'react-native';
import {
Colors,
withTheme,
RadioGroup,
RadioButtonGroup,
RadioButton,
Paragraph,
} from 'react-native-paper';
@@ -19,8 +19,8 @@ type State = {
value: string,
};
class RadioGroupExample extends React.Component<Props, State> {
static title = 'Radio group';
class RadioButtonGroupExample extends React.Component<Props, State> {
static title = 'Radio button group';
state = {
value: 'first',
@@ -37,7 +37,7 @@ class RadioGroupExample extends React.Component<Props, State> {
},
]}
>
<RadioGroup
<RadioButtonGroup
value={this.state.value}
onValueChange={value => this.setState({ value })}
>
@@ -49,7 +49,7 @@ class RadioGroupExample extends React.Component<Props, State> {
<Paragraph>Second</Paragraph>
<RadioButton value="second" />
</View>
</RadioGroup>
</RadioButtonGroup>
</View>
);
}
@@ -70,4 +70,4 @@ const styles = StyleSheet.create({
},
});
export default withTheme(RadioGroupExample);
export default withTheme(RadioButtonGroupExample);