UNPKG

@navinc/base-react-components

Version:
17 lines (16 loc) 782 B
import { DetailedHTMLProps, HTMLAttributes, ReactNode } from 'react'; import * as RadixCheckbox from '@radix-ui/react-checkbox'; import { InferComponentProps } from '../../types.js'; type CheckboxProps = Pick<InferComponentProps<typeof RadixCheckbox.Root>, 'checked' | 'disabled' | 'value'> & { name?: string; onChange?: (event: { target: { name: string | undefined; type: 'checkbox'; checked: RadixCheckbox.CheckedState; }; }) => void; label?: ReactNode; } & Omit<DetailedHTMLProps<HTMLAttributes<HTMLLabelElement>, HTMLLabelElement>, 'onChange'>; export declare const Checkbox: ({ name, label, checked, onChange, disabled, value, ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element; export {};