1.8.0 • Published 11 months ago

@affinidi/ui-core v1.8.0

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
11 months ago

UI Core

This is the Affinidi Core UI library. Exports a bunch of components and hooks for themeing their every aspect.

Made using React, SCSS for the components, Storybook for Documentation and rollup for bundling

Installation

$ npm i @affinidi/ui-core

Usage

Components

import {Button} from '@affinidi/ui-core'

const MyComponent = () => {
  return (
    ...
    <Button>Click Me!</Button>
    ...
  )
}

Palette Override

import { useUICoreTheme } from '@affinidi/ui-core'

const MyComponent = () => {
  useUICoreTheme({
    palette: {
      primary: {
        main: "darkblue"
      }
    }
  })

  return (
    ...
  )
}

Local Development

The library uses yalc for local development, bundling and testing. Make sure your machine has yalc installed by running npm i -g yalc

The following steps illustrate how to develop and test your local changes

  1. Do the required changes to the codebase. This can be creating new components(or updating older ones), writing hooks or any other changes that will affect the functioning of the library and ultimately the consumers
  2. Run npm run publish-local from the project root. This will run the build script and package the library into yalc's local registry acting like a pseudo npm store
  3. To test your changes in another library go to the consumer and run yalc add @affinidi/ui-core. This will create a local .yalc folder and a yalc.lock file to keep track of this local package. Then follow the usage guidelines above to test. We rinse and repeat till done.
  4. Once we're ready to commit we can cleanup the consumer by running yalc remove @affinidi/ui-core and removing the created files and folders from the previous step.
  5. Proceed with the commit.

Browsing Storybook

We dont host our storybook(yet), so one can clone the repository and browse through locally.

cd ui-core
npm i
npm run storybook

Documentation

All components have dedicated typings available but more concrete documentation would be available soon

1.8.0

11 months ago

1.7.0

11 months ago

1.6.0

11 months ago

1.5.0

11 months ago

1.4.0

12 months ago

1.3.0

12 months ago

1.2.0

12 months ago

1.1.0

1 year ago

1.0.0

1 year ago