0.6.0 • Published 3 months ago

@valkdigital/ui-kit v0.6.0

Weekly downloads
41
License
MIT
Repository
github
Last release
3 months ago

Valk Digital UI-kit

https://valkdigital.github.io/ui-kit

A fully typed component library for react native (web) development.

Setup

Instructions for using the library

Development

For further developement on this package.

yarn bootstrap

Installation

Install this package in your React Native or React project.

npm install @valkdigital/ui-kit

or

yarn add @valkdigital/ui-kit

Font

This project uses Open Sans. When you add a font to your project use the same names as the ones in the ./src/style/typography.ts file. When you set up an expo project you can use the Fonts enum like this:

import React from "react";
import { useFonts } from "expo-font";
import { Fonts } from "vex-ui";

export default function App() {
  const [loaded] = useFonts({
    [Fonts.Bold]: require("../assets/fonts/OpenSans-Bold.ttf"),
    [Fonts.Regular]: require("../assets/fonts/OpenSans-Regular.ttf"),
    [Fonts.SemiBold]: require("../assets/fonts/OpenSans-SemiBold.ttf"),
    [Fonts.IconSetSolid]: require("../assets/fonts/icomoon_solid.ttf"),
    [Fonts.IconSetOutline]: require("../assets/fonts/icomoon_outline.ttf"),
  });

Theme

In order for this component library to work you need to provide your app with a theme. Wrap your app with a provider and set your theme with the value prop. See the following examples.

Set a custom theme

Set a light and/or a dark theme.

 ThemeManager.setTheme({
        light: YourAwsomeLightTheme,
        dark: YourAwsomeDarkTheme
      });
    };

Provider

Get the theme value (dark/light) from Theme and place the provider around your app.

import { Theme } from "@valkdigital/ui-kit"

<ThemeContext.Provider
    value={darkModeOn ? Theme.dark : Theme.light}
>
    <YourAwesomeApp />
</ThemeContext.Provider>

Usage

Only components without logic, not entire screens. Components are provided by the UX team with the correct implementation, including dimensions. when a screen is beeing used only the needed props are provided, not the entire object or list is passed though.

A hotel selector provides the ability to select hotels. The HotelListItem component is defined in the UI kit and is called in an app by rendering it in a Flatlist. This way, the logic of the component is kept in the app itself and the UI kit maintains the style for the component itself.

<Flatlist
  onChange={...}
  onSelect={...}
  renderItem={() => (
    <HotelListItem />
  )}
/>

Component testing

When testing a component, the prefix Old and New are used.

Example

You can see an extensive documented web preview of the component library at https://valkdigital.github.io/ui-kit or by running yarn storybook and choose which platform you want storybook to show on. With the use of storybook you'll be able to see each component with the following topics:

  • Preview
  • Props overview
  • Additional information regarding the behavior of the component

When we upgraded storybook to version 6.5, and all components need to be rewritten (new syntax). Everytime you change a component, please add it to the example. To see the old version of storybook you can visit: https://storybook-ui-kit.pages.dev/?path=/story/booking-engine--book-availability

Icons

In media/icons/SVGmaker you can find instructions on how to create icons

0.6.0

3 months ago

0.5.18

3 months ago

0.5.19

3 months ago

0.5.17

4 months ago

0.5.16

4 months ago

0.5.15

5 months ago

0.5.14

5 months ago

0.5.10

7 months ago

0.5.11

7 months ago

0.5.12

5 months ago

0.5.13

5 months ago

0.5.8

7 months ago

0.5.7

8 months ago

0.5.9

7 months ago

0.5.4

9 months ago

0.5.3

9 months ago

0.5.6

8 months ago

0.5.5

9 months ago

0.5.0

10 months ago

0.5.2

10 months ago

0.5.1

10 months ago

0.4.5

11 months ago

0.4.4

11 months ago

0.4.3

11 months ago

0.3.0

1 year ago

0.3.6

1 year ago

0.3.5

1 year ago

0.3.8

1 year ago

0.3.7

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.4

1 year ago

0.3.3

1 year ago

0.4.1

12 months ago

0.4.0

12 months ago

0.4.2

12 months ago

0.3.9

1 year ago

0.2.9

1 year ago

0.2.7

1 year ago

0.2.6

1 year ago

0.2.8

1 year ago

0.2.3

1 year ago

0.2.2

1 year ago

0.2.5

1 year ago

0.2.4

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.9

1 year ago

0.1.6

2 years ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.5

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago

0.1.1

2 years ago

0.0.95

2 years ago

0.0.96

2 years ago

0.0.97

2 years ago

0.0.98

2 years ago

0.0.99

2 years ago

0.0.94

2 years ago

0.0.92

2 years ago

0.0.93

2 years ago

0.0.89

2 years ago

0.0.90

2 years ago

0.0.91

2 years ago

0.0.85

2 years ago

0.0.86

2 years ago

0.0.87

2 years ago

0.0.88

2 years ago

0.0.84

2 years ago

0.0.83

2 years ago

0.0.80

3 years ago

0.0.81

3 years ago

0.0.82

3 years ago

0.0.74

3 years ago

0.0.75

3 years ago

0.0.76

3 years ago

0.0.77

3 years ago

0.0.78

3 years ago

0.0.79

3 years ago

0.0.73

3 years ago

0.0.72

3 years ago

0.0.71

3 years ago

0.0.70

3 years ago

0.0.69

3 years ago

0.0.65

3 years ago

0.0.66

3 years ago

0.0.67

3 years ago

0.0.68

3 years ago

0.0.64

3 years ago

0.0.62

3 years ago

0.0.63

3 years ago

0.0.61

3 years ago

0.0.60

3 years ago

0.0.59

3 years ago

0.0.58

3 years ago

0.0.57

3 years ago

0.0.56

3 years ago

0.0.55

3 years ago

0.0.52

3 years ago

0.0.53

3 years ago

0.0.54

3 years ago

0.0.51

3 years ago

0.0.50

3 years ago

0.0.49

3 years ago

0.0.45

3 years ago

0.0.46

3 years ago

0.0.47

3 years ago

0.0.48

3 years ago

0.0.44

3 years ago

0.0.43

3 years ago

0.0.42

3 years ago

0.0.41

3 years ago

0.0.40

3 years ago

0.0.39

3 years ago

0.0.38

3 years ago

0.0.37

3 years ago

0.0.36

3 years ago

0.0.35

3 years ago

0.0.34

3 years ago

0.0.33

3 years ago

0.0.31

3 years ago

0.0.32

3 years ago

0.0.30

3 years ago

0.0.28

3 years ago

0.0.29

3 years ago

0.0.27

3 years ago

0.0.26

3 years ago

0.0.25

3 years ago

0.0.24

3 years ago

0.0.23

3 years ago

0.0.22

3 years ago

0.0.20

3 years ago

0.0.21

3 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.16

4 years ago

0.0.17

4 years ago

0.0.15

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.14

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago