import React from 'react'; import { Zap } from '~/components/shared/FeatherIcons'; import Loading from '~/components/Loading'; import Button from './Button'; import Input from './Input'; import SwitchThemed from './SwitchThemed'; import ToggleSwitch from './ToggleSwitch'; const noop = () => { /* empty */ }; const paneStyle = { padding: '20px 0', }; const optionsRule = [ { label: 'Global', value: 'Global' }, { label: 'Rule', value: 'Rule' }, { label: 'Direct', value: 'Direct' }, ]; type PaneProps = { children: React.ReactNode; style?: React.CSSProperties; }; const Pane = ({ children, style }: PaneProps) => (
{children}
); function useToggle(initialState = false) { const [onoff, setonoff] = React.useState(initialState); const handleChange = React.useCallback(() => { setonoff((x) => !x); }, []); return [onoff, handleChange] as const; } function SwitchExample() { const [checked, handleChange] = useToggle(false); return ; } function StyleGuide() { return (
); } export default StyleGuide;