@trimble-oss/moduswebcomponents
Version:
Modus Web Components is a modern, accessible UI library built with Stencil JS that provides reusable web components following Trimble's Modus design system. This updated version focuses on improved flexibility, enhanced theming options, comprehensive cust
38 lines (37 loc) • 1.51 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
import { DaisySize } from '../types';
/**
* A customizable button component used to create buttons with different sizes, variants, and types.
*
* The component supports a `<slot>` for injecting content within the button, similar to a native HTML button
*/
export declare class ModusWcButton {
private inheritedAttributes;
/** Reference to the host element */
el: HTMLElement;
/** The color variant of the button. */
color: 'primary' | 'secondary' | 'tertiary' | 'warning' | 'danger';
/** Custom CSS class to apply to the button element. */
customClass?: string;
/** If true, the button will be disabled. */
disabled?: boolean;
/** If true, the button will take the full width of its container. */
fullWidth?: boolean;
/** If true, the button will be in a pressed state (for toggle buttons). */
pressed?: boolean;
/** The shape of the button. */
shape: 'circle' | 'ellipse' | 'rectangle' | 'square';
/** The size of the button. */
size: DaisySize;
/** The type of the button. */
type: 'button' | 'submit' | 'reset';
/** The variant of the button. */
variant: 'borderless' | 'filled' | 'outlined';
/** Event emitted when the button is clicked or activated via keyboard. */
buttonClick: EventEmitter<MouseEvent | KeyboardEvent>;
componentWillLoad(): void;
private getClasses;
private handleClick;
private handleKeyDown;
render(): any;
}