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