Shared components for React Native
npm install --save rn-shared-components
or
yarn add rn-shared-components
This component is a simple wrapper for View component. It has the same props as View component and some additional props listed in Box Props
import { Box } from "rn-shared-components";
const App = () => (
<Box mFull mCenter mMarginTopLarge>
<Text>Hello World</Text>
</Box>
);
This component is a simple wrapper for TouchableOpacity component. It has the same props as TouchableOpacity component and some additional props listed in Box Props
import { TouchableOpacity } from "rn-shared-components";
const App = () => (
<TouchableOpacity mFull mCenter mMarginTopLarge>
<Text>Hello World</Text>
</TouchableOpacity>
);
This component is a simple wrapper for Text component. It has the same props as Text component and some additional props listed in Text Props
import { Text } from "rn-shared-components";
const App = () => (
<Text mFull mAlignCenter mMarginTopLarge>
Hello World
</Text>
);
Checkout the sample at Custom Props