UNPKG

@octopusdeploy/design-system-components

Version:
38 lines (37 loc) 1.22 kB
import type * as React from "react"; import type { PopoverBasicHelpProps } from "../../Popover/PopoverBasicHelp"; export interface LegendProps { /** * The label text for the legend. */ label?: string; /** * PopoverBasicHelp component to display additional help information * displays the Information icon next to the group label */ popover?: React.ReactElement<PopoverBasicHelpProps>; /** * If true displays the (optional) text next to the group label */ hasOptionalMarker?: boolean; /** * If true displays the (required) text next to the group label */ hasRequiredMarker?: boolean; /** * Controls whether the legend should appear disabled. */ disabled?: boolean; /** * Hides the label visually but keeps it accessible to screen readers. */ hideLabel?: boolean; } /** * * Legend renders accessible labels for form field groups with support for * required/optional markers, help popovers, and disabled states. * * @internal */ export declare function Legend({ label, hasOptionalMarker, hasRequiredMarker, popover, disabled, hideLabel }: LegendProps): import("react/jsx-runtime").JSX.Element | null;