gov-gui
Version:
Gov UI Component Library Typscript Build
36 lines (35 loc) • 1.17 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { AnimationProps } from '../../global/animation-helpers';
export interface RadioOption {
label: string;
value: string;
}
export declare class GovRadiobutton implements AnimationProps {
name: string;
heading: string;
subtitle: string;
options: string[] | RadioOption[] | string;
parsedOptions: RadioOption[];
value: string;
required: boolean;
requiredErrorMessage: string;
error: string;
selectedChange: EventEmitter<string>;
animation?: string;
animationDelay?: '2s' | '3s' | '4s' | '5s';
animationSpeed?: 'slow' | 'slower' | 'fast' | 'faster';
private allClasses;
watchAnimations(): void;
watchAnimationsDelay(): void;
watchAnimationsSpeed(): void;
parseOptions(newValue: string[] | RadioOption[] | string): void;
componentWillLoad(): void;
provideClass(): void;
private handleSelection;
/**
* Public method to validate the radio button group.
* If required is true and no option is selected, sets an error message and returns false.
*/
validate(): Promise<boolean>;
render(): any;
}