UNPKG

801 BPlain TextView Raw
1import { Base16Theme } from 'base16';
2import * as CSS from 'csstype';
3
4export interface Styling {
5 className?: string;
6 style?: CSS.Properties<string | number>;
7}
8
9export type StylingValueFunction = (
10 styling: Styling,
11 ...rest: unknown[]
12) => Partial<Styling>;
13
14export type StylingValue =
15 | string
16 | CSS.Properties<string | number>
17 | StylingValueFunction;
18
19export type StylingConfig = {
20 // Should actually only be string | Base16Theme
21 extend?: string | Base16Theme | StylingValue;
22} & {
23 // Should actually only be StylingValue
24 [name: string]: StylingValue | string | Base16Theme;
25};
26
27export type Theme = string | Base16Theme | StylingConfig;
28
29export type StylingFunction = (
30 keys: (string | false | undefined) | (string | false | undefined)[],
31 ...rest: unknown[]
32) => Styling;