Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Environment

Start your project

Launch whatever starter (e.q.: gatsby-starter-default). Run:

Code Block
npx gatsby new gatsby-starter-default https://github.com/gatsbyjs/gatsby-starter-defaultCopy

Add npm scopes

Add .yarnrc.yml into project root folder and add scopes:

Code Block
npmScopes:
  design-system:
    npmRegistryServer: 'https://3fgt4nq73gro73zir3xhzrljae0lqilf.lambda-url.eu-central-1.on.aws/'Copy

Install Design System package

Code Block
yarn add @design-system/buttonCopy

or install particular version

Code Block
yarn add @design-system/button@2.0.0Copy

Import to your code

Code Block
import React from 'react';
import { Button } from '@design-system/button';

export const MyAwesomeComponent = () => (
  <>
    ...
    <Button size="large" variant="primary">
      Button
    </Button>
    ...
  </>
);