Sha256: bd567c981d93b32b0a26d8b0e96c5f0bc07193bf33a7f77ab55509350e7ce223
Contents?: true
Size: 580 Bytes
Versions: 669
Compression:
Stored size: 580 Bytes
Contents
import React, { useState } from 'react' import { Toggle } from 'playbook-ui' const ToggleCustom = () => { const [choice, setChoice] = useState(false) const handleOnChange = ({ target }) => { setChoice(target.value = !choice) } return ( <> <Toggle checked={choice} size="sm" > <input className="my custom checkbox" name="custom checkbox" onChange={handleOnChange} type="checkbox" value="ABC" /> </Toggle> </> ) } export default ToggleCustom
Version data entries
669 entries across 669 versions & 2 rubygems