refactor: rename SearchBar -> Searchbar for consistency

This commit is contained in:
Satyajit Sahoo
2018-04-19 20:44:36 +02:00
parent 70cb8aa0dd
commit 4e3e9290bb
4 changed files with 14 additions and 13 deletions

View File

@@ -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,

View File

@@ -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}