rn-shared-components

1.0.5 • Public • Published

Shared components for React Native

Installation

npm install --save rn-shared-components

or

yarn add rn-shared-components

Components

Box

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>
);

TouchableOpacity

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>
);

Text

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>
);

To add custom props

Checkout the sample at Custom Props

Readme

Keywords

none

Package Sidebar

Install

npm i rn-shared-components

Weekly Downloads

0

Version

1.0.5

License

ISC

Unpacked Size

41.6 kB

Total Files

21

Last publish

Collaborators

  • aaron_ta