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) 347 B
import * as React from 'react'; import { Image } from 'react-native'; import useGlobalStyler from '../styles/useGlobalStyler'; ; const GSImage = (props) => { const generatedStyles = useGlobalStyler(props); return (React.createElement(Image, Object.assign({}, props, { style: [generatedStyles, props.style] }))); }; export default GSImage;