@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
48 lines • 1.44 kB
TypeScript
import type { PartialElement } from '@furystack/shades';
import type { Palette } from '../../services/theme-provider-service.js';
import type { ComponentSize } from '../component-size.js';
export type RadioProps = {
/**
* The value attribute for the underlying input element
*/
value: string;
/**
* Whether the radio button is disabled
*/
disabled?: boolean;
/**
* The palette color for the radio button
*/
color?: keyof Palette;
/**
* Callback when the radio button is selected
*/
onchange?: (event: Event) => void;
/**
* Label text or element displayed next to the radio button
*/
labelTitle?: JSX.Element | string;
/**
* The name attribute for the underlying input element (set automatically by RadioGroup)
*/
name?: string;
/**
* Whether the radio button is checked
*/
checked?: boolean;
/**
* The size of the radio button.
* @default 'medium'
*/
size?: ComponentSize;
/**
* Optional props for the label element
*/
labelProps?: PartialElement<HTMLLabelElement>;
};
export declare const Radio: (props: RadioProps & Omit<Partial<HTMLElement>, "style"> & {
style?: Partial<CSSStyleDeclaration>;
} & {
ref?: import("@furystack/shades").RefObject<Element>;
}, children?: import("@furystack/shades").ChildrenList) => JSX.Element;
//# sourceMappingURL=radio.d.ts.map