import { h } from 'preact'; import ArrowDropdown from '../icons/ArrowDropdown'; import ArrowDropup from '../icons/ArrowDropup'; import Button from '../components/Button'; import Heading from '../components/Heading'; import Select from '../components/Select'; import Switch from '../components/Switch'; import TextField from '../components/TextField'; import { useCallback, useState } from 'preact/hooks'; export default function StyleGuide() { const [switches, setSwitches] = useState({ 0: false, 1: true }); const handleSwitch = useCallback( (id, checked) => { setSwitches({ ...switches, [id]: checked }); }, [switches] ); return (
Disabled, off
Disabled, on
Enabled, (off initial)
Enabled, (on initial)