@strategies/ui
TypeScript icon, indicating that this package has built-in type declarations

2.20.10 • Public • Published

Strategies' Design System UI Components

ui pkg version

Publish to Chromatic chromatic link

Deploy built sb app to firebase chromatic link

Installation

pnpm add @strategies/ui

Usage

There are two types of components in the system: interface components and portals.

The interface components specify the child elements to act as portals that you can declaratively pass your content into. Regardless of declaration order, these named portals will place their children inside of the elements specified by the interface component.

Example

import { Modal, Title, Body, Buttons, Button } from '@strategies/ui'
;<Modal>
  <Title>My Modal Title</Title>

  <Body>
    <p>This is the body of my modal</p>
  </Body>

  <Buttons>
    <Button onClick={cancel}>Cancel</Button>

    <Button onClick={save}>Save</Button>
  </Buttons>
</Modal>

react How do I make changes or implement new components?

Implementing a new component

  1. Create a new folder in src/components with the name of your component.
  2. Create a new .tsx file, a testing .stories.tsx file, a new .scss file, and a README file in the folder with the name of your component.
  3. Implement your component in the file.
  4. Export your component from the file to the indes.ts in src.
  5. Test your component in Storybook.

Making changes to an existing component

  1. Find the component in src/components.
  2. Make changes to the component.
  3. Test your changes in Storybook.
  4. Commit your changes.

components

The interface components that are available are:

npm Build & Publish

  • This command will roll up all the components into dist folder.
pnpm run build

Readme

Keywords

none

Package Sidebar

Install

npm i @strategies/ui

Weekly Downloads

263

Version

2.20.10

License

MIT

Unpacked Size

7.98 MB

Total Files

83

Last publish

Collaborators

  • sasaki-strategies
  • arminakvn
  • sasaki-dev
  • tadiraman
  • eyoungberg
  • scottdpenman
  • ncaler