UNPKG

@nexara/nativeflow

Version:

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

41 lines (40 loc) 978 B
"use strict"; import React from 'react'; import { Text } from 'react-native'; import { responsiveFontSize } from "../../helpers/ResponsiveCalculations.js"; import { useTheme } from "../../hooks/index.js"; import { jsx as _jsx } from "react/jsx-runtime"; const StyledText = ({ variant = 'h5', children, style, ff, fs, tas, fw, color, themeColor, primary, secondary, ...rest }) => { const { colors, typography: { variantSizes } } = useTheme(); return /*#__PURE__*/_jsx(Text, { style: [{ fontSize: 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 }); }; export default StyledText; //# sourceMappingURL=StyledText.js.map