1.1.12 • Published 8 months ago

alma-design-system-react-native v1.1.12

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Alma DS React Native Components

Alma React Native is the official React Native lib composed with Emotion from Dasa. Access here all documentation.

Getting Started

See all components in our Storybook.

Install Package

yarn add @dasa-nexus/alma-design-system-react-native

There are required dependencies to use this package that you should have installed on your project:

  • React Native Safe Area Context (usually comes with React Navigation)
yarn add react-native-safe-area-context
  • React Native Svg
yarn add react-native-svg

How to use

In order to use the Text components (Heading, Subtitle, Body, etc) in your RN app, you will need to place the DasaSans font in your project, and load it before the render of your app. If you ar using Expo, you can do something like this:

import { useFonts } from 'expo-font';
import AppLoading from 'expo-app-loading';

...

  const [fontsLoaded] = useFonts({
    'DasaSans-Bold': require('./[PATH_TO_YOUR_FONTS_FOLDER]]/DasaSans-Bold.otf'),
    'DasaSans-BoldItalic': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-BoldItalic.otf'),
    'DasaSans-Italic': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-Italic.otf'),
    'DasaSans-Light': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-Light.otf'),
    'DasaSans-LightItalic': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-LightItalic.otf'),
    'DasaSans-Medium': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-Medium.otf'),
    'DasaSans-MediumItalic': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-MediumItalic.otf'),
    'DasaSans-Regular': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-Regular.otf'),
    'DasaSans-Semibold': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-Semibold.otf'),
    'DasaSans-SemiboldItalic': require('./[PATH_TO_YOUR_FONTS_FOLDER]/DasaSans-SemiboldItalic.otf'),
  });

  if (!fontsLoaded) {
    return <AppLoading />;
  } else {
    return <YourApp />;
  }

If you are developing an exported RN project (not using expo), you will have to react-native link your fonts (please refer to some documentation on how to do this)

Deploy

Publishing the new version on the Nexus

Publishing the new version in NPM

  • Change the package name in all files that mention it (do a general search)
    • @dasa-nexus/alma-design-system-react-nativealma-design-system-react-native
  • Remove field from package.json
  "publishConfig": {
    "registry": "https://nexus.dasaexp.io/repository/alma-design-system-mobile/"
  },
  • Swap the .npmrc file token (the token can be found in the file history)
    • From //nexus.dasaexp.io/repository/alma-design-system-mobile/:_authToken=NpmToken.*****************
    • To //registry.npmjs.org/:_authToken=npm_*****************
  • Run the command npm publish

IMPORTANT: The changes made in the second step must not be committed, but discarded after publication in the public NPM

1.1.12

8 months ago

1.1.11

9 months ago

1.1.10

12 months ago

1.1.9

12 months ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

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

1.0.0

2 years ago

0.1.5

2 years ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.1

2 years ago