react-js-switch
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "react-js-switch", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Switch is a visual toggle between two mutually exclusive states — on and off.", | ||
@@ -5,0 +5,0 @@ "main": "react-js-switch.js", |
@@ -13,30 +13,23 @@ # react-js-switch | ||
``` | ||
/... | ||
```javascript | ||
//... | ||
import Switch from 'react-js-switch' | ||
import Switch from 'react-js-switch'; | ||
export default function App() { | ||
const [isSwitchOn, setIsSwitchOn] = useState(true); | ||
const [isSwitchOn, setIsSwitchOn] = useState(true) | ||
const switch_onChange_handle = () => { | ||
setIsSwitchOn(!isSwitchOn); | ||
//... | ||
}; | ||
const switch_onChange_handle = () => { | ||
setIsSwitchOn(!isSwitchOn) | ||
/... | ||
} | ||
return ( | ||
<div> | ||
/... | ||
<Switch | ||
value={isSwitchOn} | ||
onChange={switch_onChange_handle} | ||
/> | ||
/... | ||
</div> | ||
); | ||
return ( | ||
<div> | ||
//... | ||
<Switch value={isSwitchOn} onChange={switch_onChange_handle} /> | ||
//... | ||
</div> | ||
); | ||
} | ||
``` | ||
@@ -43,0 +36,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11814
80