UNPKG

@varlet/ui

Version:

A Vue3 component library based on Material Design 2 and 3, supporting mobile and desktop.

57 lines (42 loc) 1.32 kB
import { VNode, VNodeChild } from 'vue' import { BasicAttributes, ListenerProp, Direction as RadioGroupDirection, Rules as RadioGroupRules, SetPropsDefaults, VarComponent, } from './varComponent' export declare const radioGroupProps: Record<keyof RadioGroupProps, any> export type RadioGroupValidateTrigger = 'onChange' export type RadioGroupOptionLabelRender = (option: RadioGroupOption, checked: boolean) => VNodeChild export interface RadioGroupOption { label?: string | VNode | RadioGroupOptionLabelRender value?: any disabled?: boolean [key: PropertyKey]: any } export { RadioGroupDirection } export interface RadioGroupProps extends BasicAttributes { modelValue?: any direction?: RadioGroupDirection options?: RadioGroupOption[] ariaLabel?: string labelKey?: string valueKey?: string validateTrigger?: RadioGroupValidateTrigger[] rules?: RadioGroupRules onChange?: ListenerProp<(value: any) => void> 'onUpdate:modelValue'?: ListenerProp<(value: any) => void> } export class RadioGroup extends VarComponent { static setPropsDefaults: SetPropsDefaults<RadioGroupProps> $props: RadioGroupProps $slots: { default(): VNode[] } validate(): Promise<boolean> resetValidation(): void reset(): void } export class _RadioGroupComponent extends RadioGroup {}