UNPKG

@spark-web/text

Version:

--- title: Text storybookPath: typography-text--default isExperimentalPackage: false ---

30 lines (29 loc) 1.06 kB
import type { BrighteTextDefinition, BrighteTheme } from '@spark-web/theme'; import type { ForegroundTone } from './use-foreground-tone'; export declare type UseTextProps = { /** Apply leading-trim styles. */ baseline?: boolean; /** The size of the text. */ size: keyof BrighteTheme['typography']['text']; /** The tone of the text. */ tone: ForegroundTone; /** The weight of the text. */ weight: keyof BrighteTheme['typography']['fontWeight']; }; export declare function useText({ baseline, size, tone, weight }: UseTextProps): (import("@emotion/serialize").CSSObject | undefined)[]; export declare function createTextStyles({ fontSize, lineHeight, trims }: BrighteTextDefinition, { includeTrims }?: { includeTrims?: boolean | undefined; }): { '::before'?: { marginBottom: string; content: string; display: string; } | undefined; '::after'?: { marginTop: string; content: string; display: string; } | undefined; fontSize: string; lineHeight: string; };