alinea
Version:
Headless git-based CMS
63 lines (62 loc) • 1.99 kB
TypeScript
import { type GenericStyles, type Styler } from '@alinea/styler';
import { type ComponentType, type HTMLProps, type PropsWithChildren } from 'react';
type TypoStyles = {
root: Styler;
link: Styler;
small: Styler;
h1: Styler;
h2: Styler;
h3: Styler;
h4: Styler;
h5: Styler;
p: Styler;
hyphenate: Styler;
monospace: Styler;
} | Record<string, 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?: "left" | "right" | "center";
}>) => import("react/jsx-runtime").JSX.Element) & {
H1: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "h1">;
H2: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "h2">;
H3: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "h3">;
H4: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "h4">;
H5: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "h5">;
P: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "p">;
Link: import("react").ForwardRefExoticComponent<Omit<HTMLProps<HTMLAnchorElement>, "ref"> & import("react").RefAttributes<HTMLAnchorElement>>;
link: GenericStyles | Styler<string>;
Monospace: import("./PropsWithAs.js").ComponentWithAs<{}, "span">;
Small: import("./PropsWithAs.js").ComponentWithAs<{
flat?: boolean;
light?: boolean;
}, "small">;
};
export {};