Skip to content

react-components-lab 2.2.11

Install from the command line:
Learn more about npm packages
$ npm install @dhi/react-components-lab@2.2.11
Install via package.json:
"@dhi/react-components-lab": "2.2.11"

About this version

CI - lab

@dhi/react-components-lab

This package primarily serves as the incubator for components that are not yet ready to move to the core package/library

As developers use and test the components and report issues, the maintainers learn more about shortcomings of the components: missing features, accessibility issues, bugs, API design, etc. The older and more used a component is, the less likely it is that new issues will be found and subsequently need to introduce breaking changes.

This package is created using TypeScript and MaterialUI, built using Yarn and bundled using TSDX.

The flow of adding a component

We are aiming for making it as easy as possible for a component to be added to the lab. However, the component needs to fulfill some minimum requirements:

  • [x] The component cannot be implemented by styling a Material-UI component via the theme (for instance <Button /> or <Typography />). However, if the styling is complex enough and requires a lot of styling (for instance The <Slider /> component), it can be evaluated.
  • [x] The component implements an element of the DHI Design Guidelines or is otherwise generic enough in functionality and close enough to the DHI CVI that it is likely to find reuse in other projects.
  • [x] The component needs to be reviewed by at least one of the maintainers

Showcase

Our library is showcased on the Lab Storybook

Installing the package

Generating a Personal Access token with GitHub - More info

  1. Visit Github.com → Your Profile (top right) → Settings.
  2. Develop settings (bottom of sidebar).
  3. Personal access tokens
  4. "Generate new token"
  5. Note: GitHub Packages
  6. Tick: repo, write:packages, read:packages, delete:packages, admin:repo_hook
  7. "Generate token"
  8. Click clipboard icon to copy token

Using .npmrc

  1. Open C:\users\<username>\.npmrc or create this file here if doesn't exist.
  2. Paste within it, replacing <AUTH_TOKEN> with the token you copied moments ago.
@dhi:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=<AUTH_TOKEN>

(this file can also be created in project-scope via .npmrc in root, but it is not advised as it links to your personal access token.)

Using .yarnrc.yml

  1. Open C:\users\<username>\.yarnrc.yml or create this file here if doesn't exist.
  2. Paste within it, replacing <AUTH_TOKEN> with the token you copied moments ago.
npmScopes:
  dhi:
    npmAlwaysAuth: true
    npmAuthToken: <AUTH_TOKEN>
    npmRegistryServer: "https://npm.pkg.github.com"

(this file can also be created in project-scope via .yarnrc.yml in root, but it is not advised as it links to your personal access token.)

  1. Now you may install DHI packages from GitHub Packages!

Usage

You can simply import the package using yarn or npm.

// with npm
npm install @dhi/react-components-lab

// with yarn
yarn add @dhi/react-components-lab

Contributing

If you would like to contribute to our project, please read the repository guidelines.

Documentation

In order to use our components, please follow the documentation.

Details


Assets

  • react-components-lab-2.2.11.tgz

Download activity

  • Total downloads 1
  • Last 30 days 0
  • Last week 0
  • Today 0