import {useState} from 'react'; import styled from '@emotion/styled'; import Checkbox from 'sentry/components/checkbox'; export default { title: 'Components/Forms/Controls/Checkbox', component: Checkbox, args: { size: 'sm', disabled: false, checked: true, }, argTypes: { size: { options: ['xs', 'sm', 'md'], control: {type: 'radio'}, }, disabled: { control: {type: 'boolean'}, }, }, }; export const Default = props => { const [checked, setChecked] = useState(true); return (
setChecked(e.target.checked)} />
); }; export const WithLabel = props => { const [check1, setCheck1] = useState(true); const [check2, setCheck2] = useState(false); return (
); }; const Label = styled('label')` display: flex; align-items: center; gap: 1rem; margin-bottom: 2rem; `;