@ftchinese/ftc-searchbar-react
Version: 
The search bar for FTC, which is a partial of ftc-header. It is the react version.
42 lines (27 loc) • 1.05 kB
Markdown
[](https://travis-ci.org/wangyichen1064431086/ftc-searchbar-react)
The searchbar for ftc-header-react.
```cmd
cd yourProject
npm install react react-dom prop-types
npm install "@ftchinese/ftc-searchbar-react" --save
```
Example:
```js
import SearchBar from '@ftchinese/ftc-searchbar-react';
import React from 'react';
import ReactDOM from 'react-dom';
ReactDOM.render(
  <SearchBar postUrl="\search" placeholderText = "输入年月日‘xxxx-xx-xx’可搜索该日存档" />,
  document.getElementById('root')
);
```
Type String. **Required**. The url string for post your search.
Type String. **Optional**. The placeholder word in search bar. Default is ''.
Type Bool.**Optional**. This is **the new prop in this version**. With it you can decide the search bar to be sticky on the top of page when scrolling or not.