native-base
Version:
Essential cross-platform UI components for React Native
27 lines (23 loc) • 699 B
text/typescript
import { createContext } from '../utils/createContext';
import type { ITheme } from './../theme';
import type { IModeType } from './StrictMode';
export interface INativebaseConfig {
theme?: ITheme;
suppressColorAccessibilityWarning?: boolean;
dependencies?: {
'linear-gradient': any;
};
enableRem?: boolean;
strictMode?: IModeType;
disableContrastText?: boolean;
}
export const defaultConfig: INativebaseConfig = {
strictMode: 'off',
};
export const [NativeBaseConfigProvider, useNativeBaseConfig] = createContext<{
config: INativebaseConfig;
currentBreakpoint: number;
isSSR?: boolean;
theme?: ITheme;
disableContrastText?: boolean;
}>('NativeBaseConfigProvider');