UNPKG

@primer/react

Version:

An implementation of GitHub's Primer Design System using React

38 lines (37 loc) 1.21 kB
import { WithSlotMarker } from "../utils/types/Slots.js"; import React, { InputHTMLAttributes } from "react"; //#region src/Radio/Radio.d.ts type RadioProps = { /** * A unique value that is never shown to the user. * Used during form submission and to identify which radio button in a group is selected */ value: string; /** * Name attribute of the input element. Required for grouping radio inputs */ name?: string; /** * Apply inactive visual appearance to the radio button */ disabled?: boolean; /** * Indicates whether the radio button is selected */ checked?: boolean; /** * Forward a ref to the underlying input element */ ref?: React.RefObject<HTMLInputElement>; /** * Indicates whether the radio button must be checked before the form can be submitted */ required?: boolean; } & InputHTMLAttributes<HTMLInputElement>; /** * An accessible, native radio component for selecting one option from a list. */ declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps, "ref"> & React.RefAttributes<HTMLInputElement>>; declare const _default: WithSlotMarker<typeof Radio>; //#endregion export { RadioProps, _default as default };