@pavelgric/react-native-theme-provider
Version:
Simple theme provider for React Native
7 lines (6 loc) • 928 B
TypeScript
import { Styles, BaseStyles, StyleCreator, CombinedStyleObj, ThemeContextValue, ThemeDispatchContextValue, Themes, ThemeBaseStylesContextValue } from './types';
export declare function useStyle<T extends Themes, S extends Styles<S>, BS extends BaseStyles<BS>, BSKey extends string>(styleCreator: StyleCreator<T, S>, params?: undefined): CombinedStyleObj<S, BS, BSKey>;
export declare function useStyle<T extends Themes, S extends Styles<S>, BS extends BaseStyles<BS>, BSKey extends string, P>(styleCreator: StyleCreator<T, S, P>, params: P): CombinedStyleObj<S, BS, BSKey>;
export declare function useTheme<T extends Themes, ThemeKey extends string, TP>(): ThemeContextValue<T, ThemeKey, TP>;
export declare function useThemeBaseStyles<BS extends BaseStyles<BS>, BSKey extends string>(): ThemeBaseStylesContextValue<BS, BSKey>;
export declare function useThemeDispatch<T extends Themes, TP>(): ThemeDispatchContextValue<T, TP>;