@octopusdeploy/design-system-components
Version:
The design systems component library.
55 lines (54 loc) • 1.71 kB
TypeScript
import * as React from "react";
import type { PopoverBasicHelpProps } from "../../Popover";
import type { FormFieldProps } from "../FormFieldProps";
export interface CheckboxProps extends FormFieldProps<boolean> {
/**
* The title to display above the checkbox.
*/
title?: string;
/**
* Controls whether or not to include the top and bottom margins around the checkbox.
*/
noMargin?: boolean;
/**
* Controls whether the checkbox should be automatically focused.
*/
autoFocus?: boolean;
/**
* The note to display under the checkbox.
*/
note?: string | JSX.Element;
/**
* Controls whether the checkbox is disabled.
*/
disabled?: boolean;
/**
* The label to display alongside the checkbox.
*/
label?: string | JSX.Element;
/**
* The classname to apply to the checkbox.
*
* @deprecated Please avoid using this. This property will be removed in the near future.
*/
className?: string;
/**
* The error to display under the checkbox.
*/
error?: string;
/**
* The warning to display under the checkbox.
*
* Will not be shown if an error is specified.
*/
warning?: string;
/**
* The accessible name of the checkbox.
*/
accessibleName?: string;
/**
* Optional icon component to display additional information with a popover.
*/
popover?: React.ReactElement<PopoverBasicHelpProps>;
}
export declare const Checkbox: ({ title, label, className, value, noMargin, onChange, note, error, warning, accessibleName, autoFocus, disabled, popover }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;