3d-online-sign 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/index.umd.js +11341 -0
- package/dist/index.umd.min.js +1 -0
- package/package.json +12 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
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
|
+
<AutoSuggest
|
|
22
|
+
suggestions = {suggestions}
|
|
23
|
+
onSelect = {handleSelect}
|
|
24
|
+
placeholder = "whatever..."
|
|
25
|
+
/>
|
|
26
|
+
|
|
27
|
+
<form onSubmit={handleSubmit}>
|
|
28
|
+
<AutoSuggest
|
|
29
|
+
suggestions = {suggestions}
|
|
30
|
+
onSelect = {()=>{}}
|
|
31
|
+
placeholder = "whatever..."
|
|
32
|
+
inputRef = { node => input = node}
|
|
33
|
+
/>
|
|
34
|
+
</form>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Examples
|
|
41
|
+
|
|
42
|
+
[Here're some live demos](http://demo-react-tiny-autosuggest.surge.sh)
|