UNPKG

react-native-global-styler

Version:

Lightweight and developer-friendly React Native styling toolkit with prebuilt styled components and a powerful useGlobalStyler hook for shorthand props like m_10, radius_12, resize_cover, and more.

10 lines (9 loc) 343 B
import * as React from 'react'; import { Text } from 'react-native'; import useGlobalStyler from '../styles/useGlobalStyler'; ; const GSText = (props) => { const generatedStyles = useGlobalStyler(props); return (React.createElement(Text, Object.assign({}, props, { style: [generatedStyles, props.style] }))); }; export default GSText;