import { ComponentProps, ExcludedProps, ScaleValue, VariantProps } from "@vitality-ds/system"; import type { valueof } from "../helpers/logic/type-helpers"; import { BaseTypography } from "./styled"; export type AllowedTypographyHTMLElements = keyof Pick; export type AvailableColorVariants = VariantProps["color"]; export type ColorScaleValues = `$colors${ScaleValue<"colors">}`; export type ColorType = ColorScaleValues | AvailableColorVariants; export type TypographyProps = ExcludedProps & Omit, "color"> & { /** * Override the rendered HTML element one of a predefined set of options */ htmlTag?: AllowedTypographyHTMLElements; /** * Accepts any valid colour returned by getColorScaleValueByUseCase() or a pre-set list of legacy color names */ color?: ColorType; }; export type TypographyVariantOptions = valueof, "variant">>;