UNPKG

699 BPlain TextView Raw
1import { createContext } from '../utils/createContext';
2import type { ITheme } from './../theme';
3import type { IModeType } from './StrictMode';
4
5export interface INativebaseConfig {
6 theme?: ITheme;
7 suppressColorAccessibilityWarning?: boolean;
8 dependencies?: {
9 'linear-gradient': any;
10 };
11 enableRem?: boolean;
12 strictMode?: IModeType;
13 disableContrastText?: boolean;
14}
15
16export const defaultConfig: INativebaseConfig = {
17 strictMode: 'off',
18};
19
20export const [NativeBaseConfigProvider, useNativeBaseConfig] = createContext<{
21 config: INativebaseConfig;
22 currentBreakpoint: number;
23 isSSR?: boolean;
24 theme?: ITheme;
25 disableContrastText?: boolean;
26}>('NativeBaseConfigProvider');