import React, { ReactNode } from "react"; import { MarginProps } from "styled-system"; import { TagProps } from "../../__internal__/utils/helpers/tags"; import { CommonCheckableInputProps } from "../../__internal__/checkable-input/checkable-input.component"; import type { CheckboxSizes } from "./checkbox-group/checkbox-group.component"; export interface CheckboxProps extends CommonCheckableInputProps, MarginProps, TagProps { /** * Breakpoint for adaptive spacing (left margin changes to 0). Enables the adaptive behaviour when set. * @deprecated Adaptive spacing is no longer supported on this component. */ adaptiveSpacingBreakpoint?: number; /** * [Legacy] Aria label for rendered help component * @deprecated Help tooltips are no longer supported on this component. */ helpAriaLabel?: string; /** * When true label is inline. * @deprecated The checkbox label always renders in line with the input. */ labelInline?: boolean; /** Accepts a callback function which is triggered on click event */ onClick?: (ev: React.MouseEvent) => void; /** * [Legacy] Overrides the default tooltip position. * @deprecated Tooltips are no longer supported on this component. */ tooltipPosition?: "top" | "bottom" | "left" | "right"; /** The value of the checkbox, passed on form submit */ value?: string; /** Handler for change events */ onChange: (ev: React.ChangeEvent) => void; /** Checked state of the input. */ checked: boolean; /** Indeterminate state of the input, will override checked value. */ indeterminate?: boolean; /** Size of the CheckboxGroup. */ size?: CheckboxSizes; /** Flag to configure Checkbox as mandatory. */ required?: boolean; /** Error message to be displayed when validation fails. */ error?: string | boolean; /** * Warning message to be displayed when validation warning occurs. * @deprecated The `warning` state is deprecated and will be removed in a future release. */ warning?: string | boolean; /** * [Legacy] Indicate additional information. * @deprecated Information validation is no longer supported on this component. */ info?: string | boolean; /** * Help content to be displayed under an input * @deprecated The `fieldHelp` prop is no longer supported, please use the `inputHint` prop instead. */ fieldHelp?: ReactNode; /** * If true, the FieldHelp will be displayed inline * To be used with labelInline prop set to true * @deprecated The `fieldHelpInline` prop is no longer supported on this component. */ fieldHelpInline?: boolean; /** * [Legacy] The content for the help tooltip, to appear next to the Label * @deprecated The `labelHelp` prop is deprecated and will be removed in a future release. Please use the `inputHint` prop instead. */ labelHelp?: ReactNode; /** * [Legacy] Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) * @deprecated Custom spacing for labels is no longer supported on this component. */ labelSpacing?: 1 | 2; /** * [Legacy] Label width * @deprecated Custom label widths are no longer supported on this component. */ labelWidth?: number; /** * If true the label switches position with the input * @deprecated Reversed layout is no longer supported on this component. */ reverse?: boolean; /** * Sets percentage-based input width * @deprecated Custom input widths are no longer supported on this component. */ inputWidth?: number; /** * Render the ValidationMessage above the Checkbox * @deprecated The `validationMessagePositionTop` prop is deprecated and will be removed in a future release. */ validationMessagePositionTop?: boolean; } export declare const Checkbox: React.ForwardRefExoticComponent>; export default Checkbox;