1.20.1 • Published 9 months ago

@janiscommerce/ui-native v1.20.1

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

@janiscommerce/ui-native

janis-logo

Library components for Janis Apps

Coverage Status npm version

Installation

The minimum required versions for using the package are react: 17.0.2 and react-native: 0.67.5.

npm install @janiscommerce/ui-native

Icons Installation

You will need to add the following lines in the android/app/build.gradle file:

  android {
    ...
    sourceSets {
      main {
        assets.srcDirs += [
          'src/main/assets',
          '../../node_modules/@janiscommerce/ui-native/dist/android/app/src/main/assets'
        ]
      }
    }
  }

SwipeUp component installation

You will need to have the following dependencies pre-installed:

  • "react-native-reanimated@2.17.0"
  • "react-native-gesture-handler@2.9.0"

Step 1 - Install peer dependencies

 npm i react-native-reanimated@2.17.0 react-native-gesture-handler@2.9.0
  • gesture-handler will allow you to recognize the actions performed by the user.

  • reanimated is responsible for displaying the animations in the bottom drawer.

Step 2 - Add Reanimated's babel plugin

  • Add react-native-reanimated/plugin plugin to your babel.config.js.
 module.exports = {
    presets: [
      ... // don't add it here :)
    ],
    plugins: [
      ...
      'react-native-reanimated/plugin', // <= add it here :D
    ],
  };

IMPORTANT: react-native-reanimated/plugin has to be listed last.

Usage Example

A quick example of how to import a component and start using @janiscommerce/ui-native:

import React from 'react';
import ReactDOM from 'react-dom';
import {Avatar} from '@janiscommerce/ui-native';

function App() {
	return <Avatar size="sm" placeholder="Janis" bgColor="#2979FF" />;
}

ReactDOM.render(<App />, document.querySelector('#app'));

Documentation

1.15.0

12 months ago

1.14.0

1 year ago

1.13.1

1 year ago

1.13.0

1 year ago

1.12.0

1 year ago

1.19.0

10 months ago

1.18.0

10 months ago

1.16.2

12 months ago

1.15.3

12 months ago

1.17.0

10 months ago

1.15.2

12 months ago

1.16.0

12 months ago

1.15.1

12 months ago

1.14.2

12 months ago

1.13.3

1 year ago

1.19.1

9 months ago

1.20.1

9 months ago

1.20.0

9 months ago

1.11.0

1 year ago

1.10.3

1 year ago

1.10.2

1 year ago

1.10.1

1 year ago

1.10.0

1 year ago

1.9.0

2 years ago

1.8.1

2 years ago

1.8.0

2 years ago

1.7.0

2 years ago

1.6.0

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.3.0

2 years ago

1.2.0

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago