import { ThemeConfig, ThemeName } from './types'; export interface ThemeValueProps { theme: ThemeConfig; } declare type SelectorFn = (theme: ThemeConfig) => string; declare type SelectorOrValue = SelectorFn | string; declare type Config = { [key in ThemeName]?: SelectorOrValue; }; /** * Helper to define different styles based on current theme, which can't be simply * implemented by just using theme object. Results in cleaner code when you want to * use primary background on light theme and secondary on dark/night themes. * * All values can be simple string or a selector function from theme object * * @param config - object with non-default cases, where key is theme name * @param defaultValue - default value to use when current theme is not specified in * config * * @example in `styled`: * styled.div` * color: ${themeValue({ light: "black" }, "white")}; * // ^ black on light theme, white on every other theme * background: ${themeValue({ dark: theme => theme.background.primary }, theme => theme.background.secondary)} * // primary background from theme object on dark theme, secondary on other themes * ` */ export declare const themeValue: (config: Config, defaultValue?: SelectorOrValue | undefined) => ({ theme, }: ThemeValueProps) => string; export {}; //# sourceMappingURL=themeValue.d.ts.map