UNPKG

@madeja-studio/telar

Version:

UI component library by Madeja Studio

42 lines (41 loc) 969 B
"use strict"; import { Text as RNText } from 'react-native'; import tw from "../../tailwind/index.js"; import { useTheme } from "../../theme/ThemeContextProvider.js"; import { jsx as _jsx } from "react/jsx-runtime"; const BaseText = ({ children, style, type }) => { const { theme } = useTheme(); return /*#__PURE__*/_jsx(RNText, { style: [tw`${type}`, { color: theme.text.color.regular }, theme.text.defaults.style[type], style], children: children }); }; export const H1 = props => /*#__PURE__*/_jsx(BaseText, { type: "h1", ...props }); export const H2 = props => /*#__PURE__*/_jsx(BaseText, { type: "h2", ...props }); export const H3 = props => /*#__PURE__*/_jsx(BaseText, { type: "h3", ...props }); export const Body = props => /*#__PURE__*/_jsx(BaseText, { type: "body", ...props }); export const Caption = props => /*#__PURE__*/_jsx(BaseText, { type: "caption", ...props }); //# sourceMappingURL=Text.js.map