@create-figma-plugin/ui
Version:
Production-grade Preact components that replicate the Figma UI design
23 lines • 1.1 kB
TypeScript
import { ComponentChildren } from 'preact';
import { InlineSpace } from '../../layout/inline/inline.js';
import { StackSpace } from '../../layout/stack/stack.js';
import { EventHandler } from '../../types/event-handler.js';
import { FocusableComponentProps } from '../../types/focusable-component-props.js';
export interface RadioButtonsProps extends FocusableComponentProps<HTMLDivElement> {
disabled?: boolean;
direction?: 'vertical' | 'horizontal';
onChange?: EventHandler.onChange<HTMLInputElement>;
onValueChange?: EventHandler.onValueChange<string>;
options: Array<RadioButtonsOption>;
space?: StackSpace | InlineSpace;
value: null | string;
}
export type RadioButtonsOption = {
disabled?: boolean;
children?: ComponentChildren;
value: string;
};
export declare const RadioButtons: import("preact").FunctionalComponent<Omit<import("../../utilities/create-component.js").MixinHTMLElementAttributes<HTMLDivElement, RadioButtonsProps>, "ref"> & {
ref?: import("preact").Ref<HTMLDivElement> | undefined;
}>;
//# sourceMappingURL=radio-buttons.d.ts.map