theme-vir
Version:
Create an entire web theme.
37 lines (36 loc) • 987 B
TypeScript
export declare enum HeadingLevel {
H1 = "h1",
H2 = "h2",
H3 = "h3",
H4 = "h4",
H5 = "h5",
H6 = "h6"
}
export type FontSize = {
pixels: number;
} | {
ratio: number;
};
export type FontStyle = {
weight: number;
family: string;
lineHeight: FontSize;
size: FontSize;
};
export type RequiredThemeOptions<TagPrefix extends string> = {
elementTagPrefix: TagPrefix;
};
export type OptionalThemeOptions = {
font?: {
default: FontStyle;
bold: FontStyle;
monospace: FontStyle;
headings: Record<HeadingLevel, FontStyle>;
};
colors?: {
error: string;
};
};
export type ThemeOptions<TagPrefix extends string> = Required<RequiredThemeOptions<TagPrefix>> & Partial<OptionalThemeOptions>;
export type AllThemeOptions<TagPrefix extends string> = Required<RequiredThemeOptions<TagPrefix>> & Required<OptionalThemeOptions>;
export declare function createDefaultThemeOptions(): AllThemeOptions<any>;