UNPKG

carbon-react

Version:

A library of reusable React components for easily building user interfaces.

27 lines (26 loc) 1.38 kB
import React from "react"; import { MarginProps } from "styled-system"; import { TagProps } from "../../__internal__/utils/helpers/tags"; import { CommonCheckableInputProps } from "../../__internal__/checkable-input/checkable-input.component"; export interface CheckboxProps extends CommonCheckableInputProps, MarginProps, TagProps { /** Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set */ adaptiveSpacingBreakpoint?: number; /** Prop to specify the aria-labelledby property of the input */ "aria-labelledby"?: string; /** [Legacy] Aria label for rendered help component */ helpAriaLabel?: string; /** When true label is inline */ labelInline?: boolean; /** Accepts a callback function which is triggered on click event */ onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void; /** [Legacy] Overrides the default tooltip position */ tooltipPosition?: "top" | "bottom" | "left" | "right"; /** The value of the checkbox, passed on form submit */ value?: string; /** Handler for change events */ onChange: (ev: React.ChangeEvent<HTMLInputElement>) => void; /** Checked state of the input */ checked: boolean; } export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>; export default Checkbox;