mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-17 04:09:48 +08:00
refactor: rename SearchBar -> Searchbar for consistency
This commit is contained in:
@@ -17,7 +17,7 @@ import ProgressBarExample from './ProgressBarExample';
|
||||
import RadioButtonExample from './RadioButtonExample';
|
||||
import RadioButtonGroupExample from './RadioButtonGroupExample';
|
||||
import RippleExample from './RippleExample';
|
||||
import SearchBarExample from './SearchBarExample';
|
||||
import SearchbarExample from './SearchbarExample';
|
||||
import SwitchExample from './SwitchExample';
|
||||
import TextExample from './TextExample';
|
||||
import TextInputExample from './TextInputExample';
|
||||
@@ -43,7 +43,7 @@ export const examples = {
|
||||
radio: RadioButtonExample,
|
||||
radioGroup: RadioButtonGroupExample,
|
||||
ripple: RippleExample,
|
||||
searchbar: SearchBarExample,
|
||||
searchbar: SearchbarExample,
|
||||
switch: SwitchExample,
|
||||
text: TextExample,
|
||||
textInput: TextInputExample,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import * as React from 'react';
|
||||
import { StyleSheet, View } from 'react-native';
|
||||
import { Colors, Caption, SearchBar, withTheme } from 'react-native-paper';
|
||||
import { Colors, Caption, Searchbar, withTheme } from 'react-native-paper';
|
||||
import type { Theme } from 'react-native-paper/types';
|
||||
|
||||
type Props = {
|
||||
@@ -33,20 +33,20 @@ class SearchExample extends React.Component<Props, State> {
|
||||
} = this.props;
|
||||
return (
|
||||
<View style={[styles.container, { backgroundColor: background }]}>
|
||||
<SearchBar
|
||||
<Searchbar
|
||||
placeholder="Search"
|
||||
onChangeText={query => this.setState({ firstQuery: query })}
|
||||
value={this.state.firstQuery}
|
||||
/>
|
||||
<Caption style={styles.caption}>Clickable icon</Caption>
|
||||
<SearchBar
|
||||
<Searchbar
|
||||
placeholder="Search"
|
||||
onChangeText={query => this.setState({ secondQuery: query })}
|
||||
value={this.state.secondQuery}
|
||||
onIconPress={() => this.props.navigation.goBack()}
|
||||
icon="arrow-back"
|
||||
/>
|
||||
<SearchBar
|
||||
<Searchbar
|
||||
placeholder="Search"
|
||||
onChangeText={query => this.setState({ thirdQuery: query })}
|
||||
value={this.state.thirdQuery}
|
||||
Reference in New Issue
Block a user