UNPKG

@bliss-design-system/button

Version:

Button component, or an anchor element styled as a button.

59 lines (58 loc) 2.5 kB
import { LitElement, TemplateResult, CSSResultArray, PropertyValues } from 'lit-element'; declare const observer: unique symbol; declare const BlissButton_base: typeof LitElement & { new (...args: any[]): import("@bliss-design-system/shared").IconElementInterface; prototype: import("@bliss-design-system/shared").IconElementInterface; }; /** * @element bliss-button * * @prop {String} [type=button] - input type, one of 'button', 'submit' or 'reset' * @prop {String} [href] - converts button into an anchor tag * @prop {String} {_blank|_parent|_self|_top} [target] - where to open the link, requires `href` attribute * @prop {String} [rel] - sets the relationship between the link and the document, requires `href` attribute * @prop {String} [download] - download instead of navigate, requires `href` attribute * * @attr {Boolean} [disabled=false] - whether or not to disable the button * @attr {Boolean} [loading=false] - whether or not to display loading spinner * @attr {String} [icon] - The name of the icon to display * @attr {Boolean} [icon-trailing=false] - whether to display the icon after the label * @attr {Boolean} [icon-only=false] - whether to display an icon only * @attr {Boolean} [full-width=false] - whether to make the button full width of its container * @attr {primary|secondary|ghost} [variant=primary] - button variant * @attr {default|netural|critical} [theme=default] - button theme * @attr {small|medium} [size=medium] - button size * @attr {Boolean} [transparent=false] - whether the background color of the button is transparent or not * * @slot - Default text slot * @slot icon — icon slot * * @csspart button */ export declare class BlissButton extends BlissButton_base { private [observer]; private content; protected iconTrailing: boolean; protected iconOnly: boolean; loading: boolean; disabled: boolean; type: 'button' | 'submit' | 'reset'; href?: string; target?: '_blank' | '_parent' | '_self' | '_top'; rel?: string; download?: string; static get styles(): CSSResultArray; constructor(); private handleClick; private setAriaLabel; firstUpdated(changed: PropertyValues): void; private slotObserver; private observe; connectedCallback(): void; disconnectedCallback(): void; private get contentTemplate(); protected renderAnchor(): TemplateResult; protected renderButton(): TemplateResult; protected render(): TemplateResult; } export {};