pyro
Version:
Pyro custom elements
42 lines (41 loc) • 1.5 kB
TypeScript
import { LitElement } from 'lit';
/**
* Switch input button
* [docs](https://pyrojs.com/el/switch)
*
* ```html
* <pyro-switch checked></pyro-switch>
* ```
*
* @tag pyro-switch
*
* @event {InputEvent} input - emitted when the value changes
*
* @cssprop [--pyro-switch-border-radius=var(--pyro-switch-size)] - set low value for squared look, equals size by default
* @cssprop [--pyro-switch-size=1em] - size of the switch
* @cssprop [--pyro-switch-border=var(--pyro-border)] - `border`
* @cssprop [--pyro-switch-surface-color=var(--pyro-surface-color)] - `background`
* @cssprop [--pyro-switch-accent-color=var(--pyro-accent-color)] - `background`
* @cssprop [--pyro-switch-ball-size=var(--pyro-switch-size=1em)] - ball size
* @cssprop [--pyro-switch-ball-color=var(--pyro-foreground-color)] - ball `background`
* @cssprop [--pyro-switch-ball-border=var(--pyro-border)] - ball `border`
* @cssprop [--pyro-switch-disabled-color=var(--pyro-disabled-color)] - disabled `background`
*
*/
export declare class PyroSwitch extends LitElement {
static styles: import('lit').CSSResult;
/** Checked */
checked: boolean;
/** Disabled */
disabled?: boolean | undefined;
/** Value on element instance for referencing with js */
value: boolean;
handleClick: (e: InputEvent) => void;
connectedCallback(): void;
render(): import('lit-html').TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'pyro-switch': PyroSwitch;
}
}