@finastra/skeleton
Version:
Skeleton Web Component
35 lines (34 loc) • 1.29 kB
TypeScript
import { LitElement, PropertyValues } from 'lit';
export declare const enum SKELETON_TYPE {
CIRCLE = "circle",
TEXT = "text",
RECTANGLE = "rectangle"
}
/**
* @cssprop [--fds-skeleton-width=162px] - Height of the skeleton
* @cssprop [--fds-skeleton-height=162px]- Width of the skeleton
* @cssprop [--fds-skeleton-placeholder-color=var(--fds-on-surface-medium)]- Color of placeholder.
* @cssprop [--fds-skeleton-background=var(--fds-surface-selected)] - Background color of the skeleton.
*
* @attr {string} [height] - Height of the skeleton
* @attr {string} [width] - Width of the skeleton
* @attr {circle|text|rectangle} [type=text] - Define the type of skeleton
* @attr {h1|h2|h3|h4|h5|h6|small|p} [size=p] - Define the size of skeleton
*/
export declare class Skeleton extends LitElement {
static styles: import("lit").CSSResult;
type: 'circle' | 'text' | 'rectangle';
size?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'small' | 'p';
width?: string;
height?: string;
connectedCallback(): void;
willUpdate(_changedProperties: PropertyValues): void;
updateWidth(): void;
updateHeight(): void;
render(): import("lit").TemplateResult<1>;
}
declare global {
interface HTMLElementTagNameMap {
'fds-skeleton': Skeleton;
}
}