UNPKG

alinea

Version:

[![npm](https://img.shields.io/npm/v/alinea.svg)](https://npmjs.org/package/alinea) [![install size](https://packagephobia.com/badge?p=alinea)](https://packagephobia.com/result?p=alinea)

65 lines (64 loc) 2.16 kB
import { ComponentType, HTMLProps, PropsWithChildren } from 'react'; import { GenericStyles, Styler } from './Styler.js'; type TypoStyles = { root: Styler; link: Styler; small: Styler; h1: Styler; h2: Styler; h3: Styler; h4: Styler; h5: Styler; p: Styler; hyphenate: Styler; monospace: Styler; } | GenericStyles; interface Overrides { a?: ComponentType<any>; h1?: ComponentType<any>; h2?: ComponentType<any>; h3?: ComponentType<any>; h4?: ComponentType<any>; h5?: ComponentType<any>; p?: ComponentType<any>; link?: ComponentType<any>; small?: ComponentType<any>; } export declare function createTypo(styles: TypoStyles, overrides?: Overrides): (({ children, align }: PropsWithChildren<{ align?: "center" | "left" | "right" | undefined; }>) => import("react/jsx-runtime").JSX.Element) & { H1: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "h1">; H2: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "h2">; H3: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "h3">; H4: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "h4">; H5: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "h5">; P: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "p">; Link: import("react").ForwardRefExoticComponent<Omit<HTMLProps<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>; link: Styler | (Styler & { [key: string]: Styler & any; }); Monospace: import("./PropsWithAs.js").ComponentWithAs<{}, "span">; Small: import("./PropsWithAs.js").ComponentWithAs<{ flat?: boolean | undefined; light?: boolean | undefined; }, "small">; }; export {};