react-responsive-select
Advanced tools
Comparing version
{ | ||
"name": "react-responsive-select", | ||
"version": "5.0.0-alpha-19", | ||
"version": "5.0.0-alpha-20", | ||
"description": "A React customisable, touchable, single-select / multi-select form component. Built with keyboard and screen reader accessibility in mind.", | ||
@@ -5,0 +5,0 @@ "main": "dist/ReactResponsiveSelect.js", |
@@ -22,2 +22,36 @@ # react-responsive-select | ||
## Getting started | ||
Install the dependency - https://www.npmjs.com/package/react-responsive-select | ||
`npm install react-responsive-select -save-dev` | ||
Example usage: | ||
``` | ||
import React from 'react'; | ||
import RRS from 'react-responsive-select'; | ||
const onChange = (newValue) => console.log('onChange', newValue); | ||
const onSubmit = () => console.log('onSubmit'); | ||
const Form = () => ( | ||
<form> | ||
<RRS | ||
name="make" | ||
options={[ | ||
{ text: 'Any', value: 'null' }, | ||
{ text: 'Oldsmobile', value: 'oldsmobile', markup: <span>Oldsmobile</span> }, | ||
{ text: 'Ford', value: 'ford', markup: <span>Ford</span> } | ||
]} | ||
selectedValue="oldsmobile" | ||
onSubmit={onSubmit} | ||
onChange={onChange} | ||
caretIcon={<CaretIcon />} | ||
/> | ||
</form> | ||
); | ||
``` | ||
## StoryBook Examples & Demo | ||
@@ -43,2 +77,2 @@ | ||
Have a read of [README_INTERACTION_TESTS.md](./README_INTERACTION_TESTS.md) | ||
Have a read of [README_BUSINESS_RULES.md](./README_BUSINESS_RULES.md) |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
828067
0.64%324
0.31%77
79.07%0
-100%