@scania/tegel
Version:
Tegel Design System
34 lines (33 loc) • 1.29 kB
TypeScript
/**
* @slot label - Slot for the text injection. Serves as alternative to text prop.
* @slot icon - Slot used to display an Icon in the Button.
*/
export declare class TdsButton {
host: HTMLElement;
/** Text displayed inside the Button */
text?: string;
/** Button's type */
type: 'button' | 'submit' | 'reset';
/** Variation of Button's design */
variant: 'primary' | 'secondary' | 'ghost' | 'danger';
/** Size of a Button */
size: 'xs' | 'sm' | 'md' | 'lg';
/** Control for disabled state of a component */
disabled: boolean;
/** When enabled, the Button takes 100% width */
fullbleed: boolean;
/** Set the mode variant of the Button. */
modeVariant: 'primary' | 'secondary' | null;
/** Determines if and how the button should animate. */
animation: 'none' | 'fade';
/** The value to be used for the aria-label attribute if onlyIcon is set to true */
tdsAriaLabel?: string;
/** The name attribute allows for different ways of accessing the button element */
name?: string;
/** The value attribute can be used when handling a form submission */
value?: string;
onlyIcon: boolean;
handleKeyDown(event: KeyboardEvent): void;
handleKeyUp(event: KeyboardEvent): void;
render(): any;
}