@octopusdeploy/design-system-components
Version:
The design systems component library.
50 lines (49 loc) • 1.65 kB
TypeScript
import * as React from "react";
import type { PopoverBasicHelpProps } from "../../Popover";
export interface RadioButtonProps<T extends string | boolean> {
/**
* The value of the radio button.
*/
value: T;
/**
* The name of the radio group. If not provided, will use the name from RadioGroup context.
*/
name: string;
/**
* The label of the radio button.
*/
label: string;
/**
* Controls whether the radio button should be the default selected option.
*/
hasDefaultMarker?: boolean;
/**
* Controls whether the radio button is disabled.
*/
disabled?: boolean;
/**
* Controls whether the radio button should be automatically focused.
*/
autoFocus?: boolean;
/**
* The description of the radio button.
*/
description?: string;
/**
* PopoverBasicHelp component to display additional help information
* displays the Information icon next to the group label
*/
popover?: React.ReactElement<PopoverBasicHelpProps>;
}
/**
* RadioButton component that supports rich descriptions with inline links.
*
* @example
* ```tsx
* import { RadioButtonNew } from '@octopusdeploy/design-system-components';
*
* <RadioButtonNew label="Label for radio button" description="Description for radio button" disabled={false} value="option1" name="radio-group"} />
* ```
*/
export declare function RadioButtonNew<T extends string | boolean>({ label, description, disabled, value, name, autoFocus, hasDefaultMarker, popover }: RadioButtonProps<T>): import("react/jsx-runtime").JSX.Element;
export default RadioButtonNew;