@loadsmart/miranda-wc
Version:
Miranda Web Components component library
64 lines (63 loc) • 1.67 kB
TypeScript
import type { PropertyValues } from 'lit';
import type { ColorToken } from '@loadsmart/miranda-tokens';
import { Component } from '../component';
import type { TypographyVariant } from '../../styles';
type HTMLTag = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'p' | 'span';
export interface TextProps {
as?: HTMLTag;
color?: ColorToken;
ellipsized?: boolean;
variant?: TypographyVariant;
}
export declare class Text extends Component implements TextProps {
static styles: import("lit").CSSResult[];
static get properties(): {
as: {
type: StringConstructor;
reflect: boolean;
};
color: {
type: StringConstructor;
reflect: boolean;
};
ellipsized: {
type: BooleanConstructor;
reflect: boolean;
};
variant: {
type: StringConstructor;
reflect: boolean;
};
};
/**
* Text color.
* @type {ColorToken}
*/
color: ColorToken;
/**
* Option to enable text ellipsis.
* @type {Boolean}
*/
ellipsized: boolean;
/**
* Typography variant.
* @type {TypographyVariant}
*/
variant: TypographyVariant;
/**
* Which HTML tag should be used to render this element.
* @type {HTMLTag}
* @deprecated wrap the text in the desired tag
*/
as?: HTMLTag;
static define(): void;
constructor();
protected update(changedProperties: PropertyValues<this>): void;
render(): import("lit-html").TemplateResult;
}
declare global {
interface HTMLElementTagNameMap {
'm-text': Text;
}
}
export {};