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.
11 lines (10 loc) • 524 B
JavaScript
import * as React from 'react';
import { ImageBackground } from 'react-native';
import useGlobalStyler from '../styles/useGlobalStyler';
;
const GSImageBackground = (props) => {
const generatedStyles = useGlobalStyler(props);
const generatedImageStyles = useGlobalStyler(props, 'image_');
return (React.createElement(ImageBackground, Object.assign({}, props, { imageStyle: [generatedImageStyles, props.imageStyle], style: [generatedStyles, props.style] }), props.children));
};
export default GSImageBackground;