mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
45 lines
1.2 KiB
TypeScript
45 lines
1.2 KiB
TypeScript
/// <reference types="svelte" />
|
|
|
|
export interface RadioButtonGroupProps extends svelte.JSX.HTMLAttributes<HTMLElementTagNameMap["div"]> {
|
|
/**
|
|
* Set the selected radio button value
|
|
*/
|
|
selected?: string;
|
|
|
|
/**
|
|
* Set to `true` to disable the radio buttons
|
|
* @default false
|
|
*/
|
|
disabled?: boolean;
|
|
|
|
/**
|
|
* Specify the label position
|
|
* @default "right"
|
|
*/
|
|
labelPosition?: "right" | "left";
|
|
|
|
/**
|
|
* Specify the orientation of the radio buttons
|
|
* @default "horizontal"
|
|
*/
|
|
orientation?: "horizontal" | "vertical";
|
|
|
|
/**
|
|
* Set an id for the container div element
|
|
*/
|
|
id?: string;
|
|
}
|
|
|
|
export default class RadioButtonGroup {
|
|
$$prop_def: RadioButtonGroupProps;
|
|
$$slot_def: {
|
|
default: {};
|
|
};
|
|
|
|
$on(eventname: "click", cb: (event: WindowEventMap["click"]) => void): () => void;
|
|
$on(eventname: "mouseover", cb: (event: WindowEventMap["mouseover"]) => void): () => void;
|
|
$on(eventname: "mouseenter", cb: (event: WindowEventMap["mouseenter"]) => void): () => void;
|
|
$on(eventname: "mouseleave", cb: (event: WindowEventMap["mouseleave"]) => void): () => void;
|
|
$on(eventname: "change", cb: (event: CustomEvent<any>) => void): () => void;
|
|
$on(eventname: string, cb: (event: Event) => void): () => void;
|
|
}
|