Borealis Design System
yarn add @borealisgroup/design-system
In your Wrapper component you do
import { Header, CombinedThemeProvider } from '@borealisgroup/design-system';
export const App = () => {
return (
<CombinedThemeProvider>
<Header />
{/* Any child component here can use components from '@borealisgroup/design-system' */}
</CombinedThemeProvider>
);
}
Our default font is Roboto, you have to include it yourself. One way to do this is by including the following link tag in your html head.
<!DOCTYPE html>
<html lang="en">
<head>
...
<link href='http://fonts.googleapis.com/css?family=Roboto' rel='stylesheet' type='text/css'>
...
</head>
...
You can find our component documentation on Storybook
Updating this library
- Update one of our components or get the latest icons from Figma by running
yarn build:icons
- Run
yarn build:library
- Increase the version number in package.json (feel free to automate it)
- Run
npm publish
Testing locally this library
- Git clone this library
- Navigate to the root of this folder
- Run
yarn build:library
- Make sure to remove the (react) node_modules otherwise you will get "Invalid Hooks" error. This is because you have multiple versions of React
- In another React project you can install it by referencing the location of this folder on your local drive, for example
yarn add ../design-system
Deploy locally
Firstly, be sure you are logged in AWS: make login
.
The command above comes from the optional dependency, if you don't have it run: make utils
then make login
.
Secondly, be sure you have all the required Helm repos. Run helm repo list
. The result should be the following:
NAME URL
bitnami https://charts.bitnami.com/bitnami
k8s-at-home https://k8s-at-home.com/charts/
If is not, just add the missing one:
heml repo add NAME URL
Finally, in order to deploy the app locally run the following steps:
-
kubectl config use-context docker-desktop
(prepare to build your project’s local docker images) -
make build
(build the images) -
kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/master/deploy/static/provider/cloud/deploy.yaml
(deploy the local gateway) make deploy
You app will be available in: http://storybook.127.0.0.1.nip.io/