@carbon/react
Version:
React components for the Carbon Design System
51 lines (50 loc) • 1.55 kB
TypeScript
import React from 'react';
export interface InlineCheckboxProps {
'aria-label': string;
/**
* Deprecated, please use `aria-label` instead.
* Specify the label for the control
*/
ariaLabel?: string;
/**
* Specify whether the underlying control is checked,
* or not
* @default false
* */
checked?: boolean;
/**
* Specify whether the underlying input control should be disabled
* @default false
*/
disabled?: boolean;
/**
* Provide an `id` for the underlying input control
*/
id: string;
/**
* Specify whether the control is in an indeterminate state
*/
indeterminate?: boolean;
/**
* Provide a `name` for the underlying input control
*/
name: string;
/**
* Provide an optional hook that is called each time the input is updated
*/
onChange?: (checked: boolean, id: string, event: React.ChangeEvent<HTMLInputElement>) => void;
/**
* Provide a handler that is invoked when a user clicks on the control
*/
onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
/**
* Provide a handler that is invoked on the key down event for the control
*/
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
/**
* Provide an optional tooltip for the InlineCheckbox
*/
title?: string;
}
declare const InlineCheckbox: React.ForwardRefExoticComponent<InlineCheckboxProps & React.RefAttributes<HTMLInputElement>>;
export default InlineCheckbox;