apphouse
Version:
Component library for React that uses observable state management and theme-able components.
26 lines (25 loc) • 773 B
TypeScript
import { ThemeTokens } from '../styles/defaults/themes.interface';
import { Style } from './Style';
import { Token } from './Token';
export interface BaseThemeSettings {
tokens: Record<string, Token>;
styles: Record<string, Style>;
}
/**
* Get theme settings for this app
* @param theme
* @returns
*/
export declare const getDefaultThemeSettings: (theme: 'dark' | 'light') => BaseThemeSettings;
/**
* Convert object to Record<string, Token>
* @param tokens ThemeTokens tokens in object format
* @returns Record<string, Token>
*/
export declare const tokenize: (tokens: ThemeTokens) => Record<string, Token>;
/**
* Parse styles of this app
* @param theme
* @returns
*/
export declare const parsetheme: (theme: 'dark' | 'light') => Record<string, Style>;