mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-19 01:46:37 +08:00
docs: rename RadioGroup to RadioButtonGroup and fix docs
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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);
|
||||
Reference in New Issue
Block a user