@naturacosmeticos/natds-react
Version:
A collection of components from Natura Design System for React
50 lines (49 loc) • 1.29 kB
TypeScript
/// <reference types="react" />
import { BrandTypes } from '../../brandTypes/brandTypes';
export interface CheckboxProps {
/**
* If `true`, the component is checked
* @default false
*/
checked?: boolean;
/**
* Specify an optional className to be added to your Checkbox
*/
className?: string;
/**
* Specify an optional Brand to be added to your Checkbox
*/
brand?: BrandTypes;
/**
* If `true`, the Checkbox will be disabled.
* @default false
*/
disabled?: boolean;
/**
* The id of the Checkbox element. Must be the same as label
*/
id?: string;
/**
* If `true`, indicates that the value of the checkbox is indeterminate
* rather than true or false
* @default false
*/
indeterminate?: boolean;
/**
* Specify the text that will appear next to component
*/
label?: string;
/**
* The onchange event occurs when the checked state has been changed.
*/
onChange: React.ChangeEventHandler<HTMLInputElement>;
/**
* Optional ID for testing
*/
testID?: string;
/**
* The string to use as the value of the checkbox when submitting the form,
* if the checkbox is currently toggled on
*/
value: string;
}