1.1.106 • Published 7 months ago

@kroo-web/design-system v1.1.106

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

Kroo Design System

Usage

First, install the package with whatever flavour of package manager that you would like.

Install

  npm install @kroo-web/design-system -S

or

  yarn add @kroo-web/design-system -S

or

  pnpm add @kroo-web/design-system -S

Tokens

Next, add the following the highest up in your application, usually in the App.js or index.js file.

This adds the tokens used in the design system to the root of the application. (the css modules come prebundled in the build this step is only for the tokens and odd global styles included in the design system).

import "@kroo-web/design-system/dist/styles/global.css";
// For using the icons package
import "react-material-symbols/rounded";

That's all folks! You can now use the components in the design system in your application.

import { TextField } from "@kroo-web/design-system";

react-toastify

Our toasts have been styled via the design system however how the toast is displayed is handled by the react-toastify library. This means that you can use the toast function from react-toastify to display the toast in the project of your choosing and pass the Design System toast component to display it.

for setup you will need to add the ToastContainer component from react-toastify to the root of your project.

Testing without deploying the package

If you would like to test the design system without deploying the package you can run the following command in the root of the project.

  npm link

in the design system repo you will also have to run to use the react version from the repo where the design system is being used

npm link ../myproject/node_modules/react
npm link ../myproject/node_modules/react-dom

then in a project where the design system is being used run the following command.

  npm link @kroo-web/design-system

This will overwrite the package with the local version of the package and will update when rebuilt.

Note: Does not show up in the package.json it just replaces the node_modules package. this is so an unreleased version of the package cannot be deployed to prod (so after development make sure you npm install again to overwrite the local version of the package).

Next Steps

This sways more on the side of component library rather than a design system due to the lack of tokens and living documentation. However, next steps would be to create a seperate package called @kroo-web/tokens allowing us to version the tokens and use them in the design system.

We could also use Token Studio with Figma to enable the designers to have control over the tokens allowing them to change the design system and see the changes in the design system in real time.

Deployments of storybook

This app uses Terraform to manage the Amplify instance in AWS

To make a change, amend the /infra/service/amplify.tf file and then run the below:

  npm run terraform:plan
  npm run terraform:apply

Gotchas

You need to set the github token in the main.tf file

Deploying

To deploy this package you will need to add yourself to the development team of the Kroo-web organisation using the service account that can be found in onepass. Once complete you can run npm adduser and authenticate to be able to use the npm deploy command in the repo.

1.1.106

7 months ago

1.1.104

8 months ago

1.1.103

8 months ago

1.1.100

8 months ago

1.1.102

8 months ago

1.1.101

8 months ago

1.1.99

8 months ago

1.1.98

8 months ago

1.1.97

9 months ago

1.1.92

9 months ago

1.1.91

9 months ago

1.1.90

9 months ago

1.1.96

9 months ago

1.1.95

9 months ago

1.1.94

9 months ago

1.1.93

9 months ago

1.1.89

9 months ago

1.1.88

9 months ago

1.1.87

9 months ago

1.1.86

9 months ago

1.1.85

10 months ago

1.1.70

11 months ago

1.1.74

10 months ago

1.0.62

12 months ago

1.1.73

10 months ago

1.0.61

12 months ago

1.1.72

11 months ago

1.0.60

1 year ago

1.1.71

11 months ago

1.1.78

10 months ago

1.0.66

11 months ago

1.1.77

10 months ago

1.1.76

10 months ago

1.0.64

11 months ago

1.1.75

10 months ago

1.0.63

12 months ago

1.1.79

10 months ago

1.0.67

11 months ago

1.1.81

10 months ago

1.1.80

10 months ago

1.1.84

10 months ago

1.1.83

10 months ago

1.1.82

10 months ago

1.1.67

11 months ago

1.0.59

1 year ago

1.0.58

1 year ago

1.1.69

11 months ago

1.0.57

1 year ago

1.1.68

11 months ago

1.0.56

1 year ago

1.0.55

1 year ago

1.0.54

1 year ago

1.0.53

1 year ago

1.0.52

1 year ago

1.0.51

1 year ago

1.0.49

1 year ago

1.0.50

1 year ago

1.0.48

1 year ago

1.0.47

1 year ago

1.0.46

1 year ago

1.0.45

1 year ago

1.0.44

1 year ago

1.0.43

1 year ago

1.0.42

1 year ago

1.0.41

1 year ago

1.0.39

1 year ago

1.0.40

1 year ago

1.0.38

1 year ago

1.0.29

1 year ago

1.0.33

1 year ago

1.0.32

1 year ago

1.0.31

1 year ago

1.0.30

1 year ago

1.0.37

1 year ago

1.0.36

1 year ago

1.0.35

1 year ago

1.0.34

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.22

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.19

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

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

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago