Sha256: 8cad37c8829ccf70c1aadc1648150ea0aa544fd2a1fc1b1634c1117105a1fb8f
Contents?: true
Size: 590 Bytes
Versions: 4
Compression:
Stored size: 590 Bytes
Contents
// @flow 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
4 entries across 4 versions & 2 rubygems