UNPKG

carbon-react

Version:

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

44 lines (43 loc) 2.08 kB
import React from "react"; import { MarginProps } from "styled-system"; import { TagProps } from "../../../__internal__/utils/helpers/tags/tags"; import { ValidationProps } from "../../../__internal__/validations"; export interface CheckboxGroupProps extends ValidationProps, MarginProps, TagProps { /** * Unique identifier for the component. * Will use a randomly generated GUID if none is provided. */ id?: string; /** The content for the CheckboxGroup Legend */ legend?: string; /** * The content for the CheckboxGroup hint text, * will only be rendered when `validationRedesignOptIn` is true. */ legendHelp?: string; /** [Legacy] When true, legend is placed inline with the checkboxes */ legendInline?: boolean; /** [Legacy] Percentage width of legend (only when legend is inline) */ legendWidth?: number; /** [Legacy] Text alignment of legend when inline */ legendAlign?: "left" | "right"; /** [Legacy] Spacing between legend and field for inline legend, number multiplied by base spacing unit (8) */ legendSpacing?: 1 | 2; /** The Checkboxes to be rendered in the group */ children: React.ReactNode; /** Spacing between label and a field for inline label, given number will be multiplied by base spacing unit (8) */ labelSpacing?: 1 | 2; /** Flag to configure component as mandatory */ required?: boolean; /** [Legacy] Overrides the default tooltip */ tooltipPosition?: "top" | "bottom" | "left" | "right"; /** When true, Checkboxes are inline */ inline?: boolean; /** Render the ValidationMessage above the Checkbox inputs when validationRedesignOptIn flag is set */ validationMessagePositionTop?: boolean; } export declare const CheckboxGroup: { ({ children, legend, error, warning, info, required, legendInline, legendWidth, legendAlign, legendSpacing, legendHelp, tooltipPosition, inline, id, validationMessagePositionTop, ...rest }: CheckboxGroupProps): React.JSX.Element; displayName: string; }; export default CheckboxGroup;