carbon-react
Version:
A library of reusable React components for easily building user interfaces.
21 lines (20 loc) • 1.16 kB
TypeScript
import React from "react";
import { MarginProps } from "styled-system";
import { CommonCheckableInputProps } from "../../__internal__/checkable-input";
import { TagProps } from "../../__internal__/utils/helpers/tags";
interface InternalRadioButtonProps {
inline?: boolean;
}
export interface RadioButtonProps extends Omit<CommonCheckableInputProps, "required">, MarginProps, TagProps {
/** Accepts a callback function which is triggered on click event */
onClick?: (ev: React.MouseEvent<HTMLInputElement>) => void;
/** the value of the Radio Button, passed on form submit */
value: string;
/** [Legacy] Overrides the default tooltip position */
tooltipPosition?: "top" | "bottom" | "left" | "right";
/** [Legacy] Aria label for rendered help component */
helpAriaLabel?: string;
}
export declare const RadioButton: React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>;
declare const _default: React.MemoExoticComponent<React.ForwardRefExoticComponent<RadioButtonProps & InternalRadioButtonProps & React.RefAttributes<HTMLInputElement>>>;
export default _default;