react-base16-styling
Version:
React styling with base16 color scheme support
16 lines (15 loc) • 707 B
TypeScript
import * as CSS from 'csstype';
import type { Base16Theme } from './themes/index.js';
export interface Styling {
className?: string;
style?: CSS.Properties<string | number>;
}
export type StylingValueFunction = (styling: Styling, ...rest: unknown[]) => Partial<Styling>;
export type StylingValue = string | CSS.Properties<string | number> | StylingValueFunction;
export type StylingConfig = {
extend?: string | Base16Theme | StylingValue;
} & {
[name: string]: StylingValue | string | Base16Theme;
};
export type Theme = string | Base16Theme | StylingConfig;
export type StylingFunction = (keys: (string | false | undefined) | (string | false | undefined)[], ...rest: unknown[]) => Styling;