diff --git a/example/src/ExampleList.js b/example/src/ExampleList.js index 3415b9d..7dd037c 100644 --- a/example/src/ExampleList.js +++ b/example/src/ExampleList.js @@ -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, diff --git a/example/src/SearchBarExample.js b/example/src/SearchbarExample.js similarity index 93% rename from example/src/SearchBarExample.js rename to example/src/SearchbarExample.js index 2052a8f..7c856fd 100644 --- a/example/src/SearchBarExample.js +++ b/example/src/SearchbarExample.js @@ -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 { } = this.props; return ( - this.setState({ firstQuery: query })} value={this.state.firstQuery} /> Clickable icon - this.setState({ secondQuery: query })} value={this.state.secondQuery} onIconPress={() => this.props.navigation.goBack()} icon="arrow-back" /> - this.setState({ thirdQuery: query })} value={this.state.thirdQuery} diff --git a/src/components/SearchBar.js b/src/components/Searchbar.js similarity index 93% rename from src/components/SearchBar.js rename to src/components/Searchbar.js index 1a25200..588ec3b 100644 --- a/src/components/SearchBar.js +++ b/src/components/Searchbar.js @@ -40,16 +40,16 @@ type Props = { }; /** - * SearchBar is a simple input box where users can type search queries. + * Searchbar is a simple input box where users can type search queries. * *
- * + * *
* * ## Usage * ```js * import React from 'react'; - * import { SearchBar } from 'react-native-paper'; + * import { Searchbar } from 'react-native-paper'; * * export default class MyComponent extends React.Component { * state = { @@ -59,7 +59,7 @@ type Props = { * render() { * const { firstQuery } = this.state; * return ( - * { this.setState({ firstQuery: query }); }} * value={firstQuery} @@ -69,7 +69,7 @@ type Props = { * } * ``` */ -class SearchBar extends React.Component { +class Searchbar extends React.Component { _handleClearPress = () => { this.clear(); this.props.onChangeText && this.props.onChangeText(''); @@ -189,4 +189,4 @@ const styles = StyleSheet.create({ }, }); -export default withTheme(SearchBar); +export default withTheme(Searchbar); diff --git a/src/index.js b/src/index.js index 68e491c..2d3d55e 100644 --- a/src/index.js +++ b/src/index.js @@ -35,7 +35,8 @@ export { default as Paper } from './components/Paper'; export { default as ProgressBar } from './components/ProgressBar/ProgressBar'; export { default as RadioButton } from './components/RadioButton'; export { default as RadioButtonGroup } from './components/RadioButtonGroup'; -export { default as SearchBar } from './components/SearchBar'; +export { default as Searchbar } from './components/Searchbar'; +export { default as SearchBar } from './components/Searchbar'; export { default as Switch } from './components/Switch'; export { default as Toolbar } from './components/Toolbar/Toolbar'; export { default as ToolbarAction } from './components/Toolbar/ToolbarAction';