[go: up one dir, main page]

@boostxyz/boost-ui

0.12.1 • Public • Published

@boostxyz/boost-ui

Best Practice

  1. Don't compose primitive component packages (ie. Don't include a <Button> in a <Card>). Allow the implementor to use them together.

Adding a Component

Latest Steps

  • pnpm run ui:add -- table (or whatever component)
    • this will install to packages/ui/src/components/*.tsx
  • pnpm run ui:integrate table.tsx (or whatever the output file is)
    • answer the steps to generate packages/ui/src/components/MyComponent/*
  • Integrate your component for testing in apps/nextjs/src/apps/page.tsx
    • Add an accompanying *.stories.tsx for the component in apps/storybook/stories

Former Steps

  • pnpm run ui:add -- table (or whatever component)
    • this will install to packages/ui/src/components/*.tsx
  • It's probably best to stop your dev server so it can rebuild when you add the new component.
    • Restart it after you've stubbed out your component
  • Create the component directory structure to introduce the new component:
    • Duplicate a simple component (like Badge) and rename the component to your new one (including the copied files)
      • BaseBadge -> BaseNewThing
  • Copy everything except the imports from the downloaded component file, and replace everything below the imports with it
  • Rename all of the new components to be prefixed with Base
  • Replace all tailwind utility classes with a single styles.BaseComponent declaration, and apply them in the accompanying BaseComponent.module.css
    • To ensure legibility, split each class name at the space, and turn it into a new @apply line
    • Remove all dark: directives, as these will be controlled using :global(.dark) .some-class {}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.12.164latest

Version History

VersionDownloads (Last 7 Days)Published
0.12.164
0.12.091
0.11.276
0.11.141
0.11.046
0.10.35
0.10.28
0.10.14
0.9.22
0.9.13
0.9.03
0.8.02
0.7.03
0.6.01
0.5.31
0.5.21
0.5.11
0.4.01
0.3.01
0.2.61
0.2.50
0.2.40
0.2.30
0.2.20
0.2.10
0.2.00
0.1.10
0.1.00

Package Sidebar

Install

npm i @boostxyz/boost-ui

Weekly Downloads

349

Version

0.12.1

License

MIT

Unpacked Size

1.32 MB

Total Files

554

Last publish

Collaborators

  • jamieboost
  • moimikey
  • quazia
  • sammccord
  • ccashwell