tanjun
TypeScript icon, indicating that this package has built-in type declarations

1.2.0 • Public • Published

Tanjun

Write React Native style in an easy way and restore the original design one to one. Get size from designer and use it in your app. Happy coding!

Installation

yarn add tanjun

Usage

import { TanjunProvider, View, Text } from 'tanjun'

const App = () => (
  <TanjunProvider
    // Your design size
    value={{
      width: 375,
      height: 812,
    }}>
    // The width and height or the font size are obtained from the design
    <View style={{ width: 200, height: 140 }}>
      <Text style={{ fontSize: 46 }}>Hello Tanjun </Text>
    </View>
  </TanjunProvider>
)

Advanced Usage

You can provide your own Image Text View implementations. Please move to example/src/my-own-proivder.tsx for more details.

License

MIT

Package Sidebar

Install

npm i tanjun

Weekly Downloads

2

Version

1.2.0

License

MIT

Unpacked Size

82.3 kB

Total Files

51

Last publish

Collaborators

  • bang88