UNPKG

@nexara/nativeflow

Version:

Beautiful, responsive, and customizable UI components for React Native – built for performance and seamless experiences.

46 lines (45 loc) 1.28 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _react = _interopRequireDefault(require("react")); var _reactNative = require("react-native"); var _ResponsiveCalculations = require("../../helpers/ResponsiveCalculations.js"); var _index = require("../../hooks/index.js"); var _jsxRuntime = require("react/jsx-runtime"); function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; } const StyledText = ({ variant = 'h5', children, style, ff, fs, tas, fw, color, themeColor, primary, secondary, ...rest }) => { const { colors, typography: { variantSizes } } = (0, _index.useTheme)(); return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, { style: [{ fontSize: (0, _ResponsiveCalculations.responsiveFontSize)(fs ?? variantSizes[variant]), fontFamily: ff ?? '', textAlign: tas ? 'center' : 'auto', fontWeight: fw ?? 'normal', color: color ?? (themeColor && colors.primary || primary && colors.textPrimary || secondary && colors.textSecondary || colors.textTertiary) }, style], ...rest, children: children }); }; var _default = exports.default = StyledText; //# sourceMappingURL=StyledText.js.map