twrnc
Version:
simple, expressive API for tailwindcss + react-native
17 lines (16 loc) • 717 B
JavaScript
import { Platform } from 'react-native';
import plugin from './plugin';
import rawCreate from './create';
// Apply default config and inject RN Platform and RN version
const create = (twConfig = {}) => {
var _a;
return rawCreate(twConfig, Platform.OS,
// react-native-web does not expose a constants object
// @see https://github.com/necolas/react-native-web/blob/master/packages/react-native-web/src/exports/Platform/index.js
(_a = Platform.constants) === null || _a === void 0 ? void 0 : _a.reactNativeVersion);
};
export { useDeviceContext, useAppColorScheme } from './hooks';
const tailwind = create();
const style = tailwind.style;
export default tailwind;
export { create, plugin, style };