pyro
Version:
Pyro custom elements
48 lines (47 loc) • 1.75 kB
TypeScript
import { LitElement } from 'lit';
import { Color } from '../types';
/**
* Icon, with color and sizing
* [docs](https://pyrojs.com/el/icon)
*
* ```html
* <pyro-icon color="error" src="./assets/chevron-down.svg"></pyro-icon>
* ```
*
* @tag pyro-icon
*
* @cssprop [--pyro-icon-height = --pyro-font-size] - `height`
* @cssprop [--pyro-icon-width = --pyro-font-size] - `width`
* @cssprop [--pyro-icon-min-width = --pyro-font-size] - `min-width`
* @cssprop [--pyro-icon-min-height = --pyro-font-size] - `min-height`
*
* @cssprop [--pyro-icon-height-s = --pyro-font-size-s] - `height` when size="s"
* @cssprop [--pyro-icon-width-s = --pyro-font-size-s] - `width` when size="s"
* @cssprop [--pyro-icon-min-width-s = --pyro-font-size-s] - `min-width` when size="s"
* @cssprop [--pyro-icon-min-height-s = --pyro-font-size-s] - `min-height` when size="s"
*
* @cssprop [--pyro-icon-height-l = --pyro-font-size-l] - `height` when size="l"
* @cssprop [--pyro-icon-width-l = --pyro-font-size-l] - `width` when size="l"
* @cssprop [--pyro-icon-min-width-l = --pyro-font-size-l] - `min-width` when size="l"
* @cssprop [--pyro-icon-min-height-l = --pyro-font-size-l] - `min-height` when size="l"
*
*/
export declare class PyroIcon extends LitElement {
static styles: import('lit').CSSResult;
/** Icon source path */
src: string;
/** Icon color */
color?: Color;
/** Icon size */
size: 's' | 'm' | 'l';
/** Accessible name. If not provided, icon is ignored by screen readers */
alt?: string;
slotContent: HTMLElement[];
firstUpdated(): Promise<void>;
render(): import('lit-html').TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'pyro-icon': PyroIcon;
}
}