1 | import { createContext } from '../utils/createContext';
|
2 | import type { ITheme } from './../theme';
|
3 | import type { IModeType } from './StrictMode';
|
4 |
|
5 | export 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 |
|
16 | export const defaultConfig: INativebaseConfig = {
|
17 | strictMode: 'off',
|
18 | };
|
19 |
|
20 | export const [NativeBaseConfigProvider, useNativeBaseConfig] = createContext<{
|
21 | config: INativebaseConfig;
|
22 | currentBreakpoint: number;
|
23 | isSSR?: boolean;
|
24 | theme?: ITheme;
|
25 | disableContrastText?: boolean;
|
26 | }>('NativeBaseConfigProvider');
|