1.2.1 • Published 5 days ago

@freud-ds/react-native v1.2.1

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

Freud DS - Mobile

This is the implementation of Freud Design System for mobile apps

semantic-release node-version

Installing

yarn add "@freud-ds/react-native"
npm i "@freud-ds/react-native"

How to use it

import { Text, FreudDSProvider } from '@freud-ds/react-native';
import { View } from 'react-native';

export const Component: React.FC = () => {
  return (
    <FreudDSProvider>
      <View>
        <Text>Component</Text>
      </View>
    </FreudDSProvider
  )
}

Documentation (components list)

Working Locally

# Clone this repository:
git clone git@github.com:Zenklub/freud-ds-mobile.git
cd freud-ds-mobile

# Install dependencies
yarn install

# Bootstrap project (it will install everything you need)
yarn bootstrap

To overcome the problem that metro bundler has with symlinks, we're using watchman to detect changes in development mode and update it directly into the playground app. To make work properly, please install it locally

# Mac OS
brew update
brew install watchman

If you are not on a mac please refer to the watchman's documentation

Building the playground app

# iOS
yarn build:playground:ios
# Android
yarn build:playground:android

Running the build script on development mode

yarn dev

Creating components and adding it to the Playground

The playground along with the dev builder will take care of all the details to keep the code in sync. The playground works with storybook to render the components.

First create your component with minimal to display something on the screen, example:

// src/components/my-fist-component/index.ts
import React from 'react';
import { Text } from 'react';

export MyFirstComponent: React.FC = () => <Text>MyFirstComponent</Text>

Next, let's create the storybook instance so we can see it in the playground:

// src/components/my-fist-component/my-fist-component.stories.tsx
import React from 'react';
import { storiesOf } from '@storybook/react-native';
import { MyFirstComponent } from '.';

storiesOf('MyFirstComponent', module).add('Simple Usage', () => <MyFirstComponent />);

Finally, let's import our story into the application, open the src/storybook/stories.ts file and add the import statement of our component's story:

// src/storybook/stories.ts
...
+ import '@components/my-fist-component/my-fist-component.stories';

Now you can see our component is already being displayed in the playground.

Good Practice

TODO

Generating a version

TODO

1.2.0

5 days ago

1.2.1

5 days ago

1.1.4

3 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.1

10 months ago

1.0.0

10 months ago

1.0.0-beta.2

10 months ago

1.0.1-beta.1

10 months ago

1.0.0-beta.3

10 months ago

1.0.0-beta.4

10 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.0.0-beta.1

10 months ago

0.0.4

11 months ago

0.0.3

11 months ago

0.0.2

11 months ago

0.0.1

11 months ago