0.0.6-alpha • Published 6 years ago
@etidbury/react-suggestion-field
Licence
MIT
Version
0.0.6-alpha
Deps
1
Size
21 kB
Vulns
0
Weekly
0
<SuggestionField />
Usage
Install dependency
yarn add @etidbury/react-suggestion-field npm install @etidbury/react-suggestion-fieldAdd to your project
import SuggestionField from '@etidbury/react-suggestion-field' //... <SuggestionField<{title:string}> searchSuggestions={async (searchValue: string) => { //simulate load delay await new Promise((r) => setTimeout(r, 500)) return [ {title:"red"}, {title:"blue"} ].filter(({ title }) => title.includes(searchValue)) }} />
License
This code is released under the MIT license - feel free to use it.
Contribute
- Fork or clone this repository
- If using VS Code, install recommended extensions
yarn installyarn start
yarn Scripts
test- run unit teststest:cover- run unit tests with test coveragelint- checkeslintandprettierruleslint:fix- autofix unmeteslintandprettierruleslocal-pack- create thetgzpackage locally to test consumers without publishingstart- start the storybook server and automatically open in browsercompile- standard typescript compiletscnow-build- used by Zeit when building your storybook for deployment (do not rename this script)
Before each commit, husky and lint-staged will automatically lint your staged ts, tsx, js, jsx files.
Please contribute any improvements or fixes to this project!
To make sure you have a pleasant experience, please read the code of conduct. It outlines core values and beliefs and will make working together a happier experience.