@furystack/shades-common-components
Version:
Common UI components for FuryStack Shades
31 lines • 1.49 kB
TypeScript
import type { ChildrenList, PartialElement } from '@furystack/shades';
import type { Palette } from '../services/theme-provider-service.js';
/**
* Typography variant determines semantic HTML tag and default styles.
*/
export type TypographyVariant = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'subtitle1' | 'subtitle2' | 'body1' | 'body2' | 'caption' | 'overline';
/**
* Color options for the Typography component.
* Supports palette colors and text-level semantic colors.
*/
export type TypographyColor = keyof Palette | 'textPrimary' | 'textSecondary' | 'textDisabled';
export type TypographyProps = PartialElement<HTMLElement> & {
/** The typographic variant to use. Determines tag and style. Defaults to 'body1'. */
variant?: TypographyVariant;
/** Text color. Defaults to 'textPrimary'. */
color?: TypographyColor;
/** Truncate text with ellipsis. `true` for single-line, a number for max line count. */
ellipsis?: boolean | number;
/** Show a copy button that copies text content to clipboard. */
copyable?: boolean;
/** Add bottom margin for spacing. */
gutterBottom?: boolean;
/** Text alignment. */
align?: 'left' | 'center' | 'right' | 'justify';
};
/**
* Typography component for consistent text styling.
* Maps variants to semantic HTML tags and uses theme typography tokens.
*/
export declare const Typography: (props: TypographyProps, children?: ChildrenList) => JSX.Element;
//# sourceMappingURL=typography.d.ts.map