0.1.1 • Published 2 years ago
@logo-rn/logo-search-bar v0.1.1
@logo-rn/logo-search-bar
allows user to search typing in the textinput field, allows user to get search options while searching.
Installation
Install the component:
npm i @logo-rn/logo-search-bar -s
Usage
Once installed, import the component in your application:
import {LogoSearchBar, LogoSearchOptionsArea} from '@logo-rn/logo-search-bar';
const [value, setValue] = React.useState('');
<LogoSearchBar
label="Label"
placeholder="Yazı Giriniz"
value={value}
onChangeValue={(nextValue: string) => setValue(nextValue)}
/>
const popularSearchData = {
title: "Popular Searches",
data: [
"Data 1",
"Data 2",
"Data 3",
"Data 4"
]
}
<LogoSearchOptionsArea
label="Label"
placeholder="Yazı Giriniz"
noResultText="There is no result."
data={popularSearchData.data}
title={popularSearchData.title}
onClick={(value: string) => { setValue(value); setClicked(true) }}
/>