├── .babelrc
├── .gitignore
├── CHANGELOG.md
├── README.md
├── dist
└── main.js
├── examples
└── demo-proj
│ ├── .gitignore
│ ├── README.md
│ ├── package-lock.json
│ ├── package.json
│ ├── public
│ ├── favicon.ico
│ ├── index.html
│ └── manifest.json
│ └── src
│ ├── App.css
│ ├── App.js
│ ├── App.test.js
│ ├── index.css
│ ├── index.js
│ ├── logo.svg
│ └── registerServiceWorker.js
├── package-lock.json
├── package.json
├── public
└── index.html
├── src
├── App.tsx
├── AutoSuggest
│ ├── index.cm.styl
│ ├── index.tsx
│ └── types.ts
└── declarations.d.ts
├── tsconfig.json
├── webpack.dev.config.js
└── webpack.prod.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": ["@babel/preset-env", "@babel/preset-react"]
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # testing
7 | /coverage
8 |
9 | # misc
10 | .DS_Store
11 | .env.local
12 | .env.development.local
13 | .env.test.local
14 | .env.production.local
15 |
16 | npm-debug.log*
17 | yarn-debug.log*
18 | yarn-error.log*
19 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ### 2.0.0
2 |
3 | - Migarte to TypeScript.
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## Install
2 |
3 | ```
4 | npm i react-tiny-autosuggest
5 | ```
6 |
7 | ## Usage
8 |
9 | ```
10 | import AutoSuggest from 'react-tiny-autosuggest';
11 |
12 | render(){
13 | const suggestions = ['foo', 'bar'];
14 | const handleSelect = selection => {console.log(selection)};
15 |
16 | let input;
17 | const handleSubmit = () => console.log(input.value);
18 |
19 | return (
20 | // without submit button
21 |