UNPKG

@mantine/core

Version:

React components library focused on usability, accessibility and developer experience

32 lines 1.45 kB
import React from 'react'; import { DefaultProps, MantineSize } from '../../theme'; import useStyles from './Checkbox.styles'; export declare const CHECKBOX_SIZES: { xs: number; sm: number; md: number; lg: number; xl: number; }; export declare type CheckboxStylesNames = keyof ReturnType<typeof useStyles>; export interface CheckboxProps extends DefaultProps<typeof useStyles>, Omit<React.ComponentPropsWithoutRef<'input'>, 'type' | 'size'> { /** Checkbox checked and indeterminate state color from theme, defaults to theme.primaryColor */ color?: string; /** Predefined label font-size and checkbox width and height in px */ size?: MantineSize; /** Checkbox label */ label?: React.ReactNode; /** Indeterminate state of checkbox, overwrites checked */ indeterminate?: boolean; /** Props spread to wrapper element */ wrapperProps?: Record<string, any>; /** Id is used to bind input and label, if not passed unique id will be generated for each input */ id?: string; /** Get input ref */ elementRef?: React.ForwardedRef<HTMLInputElement>; } export declare function Checkbox({ className, style, checked, onChange, color, themeOverride, label, disabled, indeterminate, id, size, wrapperProps, elementRef, children, classNames, styles, ...others }: CheckboxProps): JSX.Element; export declare namespace Checkbox { var displayName: string; } //# sourceMappingURL=Checkbox.d.ts.map