UNPKG

tailwind-joy

Version:

React component library that styles the components of Joy UI in the Tailwind CSS way.

40 lines (39 loc) 2.12 kB
import type { ComponentProps, ForwardedRef, ReactNode } from 'react'; import type { ReactTags, DynamicComponentProps, Difference, BaseVariants, GeneratorInput } from '../base/types'; export type TypographyLevel = 'h1' | 'h2' | 'h3' | 'h4' | 'title-lg' | 'title-md' | 'title-sm' | 'body-lg' | 'body-md' | 'body-sm' | 'body-xs' | 'inherit'; export declare const TypographyNestedContext: import("react").Context<boolean>; type TypographyRootVariants = Pick<BaseVariants, 'color' | 'variant'> & { endDecorator?: ReactNode; gutterBottom?: boolean; level?: TypographyLevel; levelMapping?: Partial<Record<TypographyLevel, ReactTags>>; noWrap?: boolean; startDecorator?: ReactNode; textColor?: string; } & { slotProps?: { root?: ComponentProps<'a'>; startDecorator?: ComponentProps<'span'>; endDecorator?: ComponentProps<'span'>; }; }; type TypographyRootProps<T extends ReactTags> = Difference<DynamicComponentProps<T>, TypographyRootVariants> & TypographyRootVariants; export declare const Typography: <T extends keyof JSX.IntrinsicElements = "span">(props: Difference<DynamicComponentProps<T>, TypographyRootVariants> & Pick<BaseVariants, "color" | "variant"> & { endDecorator?: ReactNode; gutterBottom?: boolean | undefined; level?: TypographyLevel | undefined; levelMapping?: Partial<Record<TypographyLevel, keyof JSX.IntrinsicElements>> | undefined; noWrap?: boolean | undefined; startDecorator?: ReactNode; textColor?: string | undefined; } & { slotProps?: { root?: import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> | undefined; startDecorator?: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> | undefined; endDecorator?: import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement> | undefined; } | undefined; } & { ref?: ForwardedRef<unknown> | undefined; }) => JSX.Element; export declare const generatorInputs: GeneratorInput[]; export {};