soft-components
Version:
Simple soft flexible set of web components
87 lines (86 loc) • 2.27 kB
TypeScript
import { EventEmitter } from '../../stencil-public-runtime';
/**
* @slot - Content is placed between the named slots if provided without a slot.
*/
export declare class ScButton {
el: HTMLElement;
/**
* If `true`, the user cannot interact with the button.
*/
disabled: boolean;
/**
* This attribute instructs browsers to download a URL instead of navigating to
* it, so the user will be prompted to save it as a local file. If the attribute
* has a value, it is used as the pre-filled file name in the Save prompt
* (the user can still change the file name if they want).
*/
download: string | undefined;
/**
* Contains a URL or a URL fragment that the hyperlink points to.
* If this property is set, an anchor tag will be rendered.
*/
href: string | undefined;
/**
* Specifies the relationship of the target object to the link object.
* The value is a space-separated list of [link types](https://developer.mozilla.org/en-US/docs/Web/HTML/Link_types).
*/
rel: string | undefined;
/**
* Make button `display: block`
*/
block?: boolean | undefined;
/**
* Icon only button
*/
icon?: boolean | undefined;
/**
* If prop exists, button will have an engraved-styled border
*/
bordered?: boolean | undefined;
/**
* Specifies where to display the linked URL.
* Only applies when an `href` is provided.
* Special keywords: `"_blank"`, `"_self"`, `"_parent"`, `"_top"`.
*/
target: string | undefined;
/**
* The type of the button.
*/
type: 'submit' | 'reset' | 'button';
/**
* If this button has both icon and text
*/
iconText?: boolean | undefined;
/**
* Set active state for the button
*/
active?: boolean;
/**
* Make button flat
*/
flat?: boolean;
/**
* Make button circle shaped
*/
circle?: boolean;
/**
* Use mouse as the light source (ray-tracing)
*/
rayTracing?: boolean;
/**
* Emitted when the button has focus.
*/
focusEvent: EventEmitter<void>;
/**
* Emitted when the button loses focus.
*/
blurEvent: EventEmitter<void>;
/**
* Emitted when the button is clicked.
*/
clickEvent: EventEmitter<void>;
private onFocus;
private onBlur;
private onClick;
render(): any;
}