import { useId } from 'react' import type { ReactNode, HTMLProps, ComponentProps } from 'react' import classNames from 'classnames' import Field from '../field' import Fieldset from '../fieldset' import './style.scss' interface ToggleBaseProps { id: string field: HTMLProps } function ToggleBase({ id, field, ...rest }: ToggleBaseProps) { return (
) } interface ToggleFieldProps { isInvalid?: boolean isLoading?: boolean isRequired?: boolean isOptional?: boolean id?: string label?: ReactNode helperText?: ReactNode error?: ReactNode field: HTMLProps className?: string } export default function ToggleField({ isInvalid, isLoading, isRequired, isOptional, id, label, helperText, error, field, className, ...rest }: ToggleFieldProps) { const generatedId = useId() const inputId = id ?? generatedId return ( ) } interface ToggleGroupProps extends ComponentProps { children: ReactNode } function ToggleGroup({ layout = 'vertical', legend, isOptional, isRequired, children, }: ToggleGroupProps) { return (
{children}
) } function ToggleGroupField(props: ToggleFieldProps) { return ( ) } export const Group = { Root: ToggleGroup, Field: ToggleGroupField, }