Skip to content

Latest commit

 

History

History
59 lines (36 loc) · 1.44 KB

README.md

File metadata and controls

59 lines (36 loc) · 1.44 KB

Monorepo

What's included?

Installation

Run the following command:

npx degit https://github.com/goldcoders-corp/monorepo.git monorepo
cd monorepo
pnpm install
git init . && git add . && git commit -m "Init"

Components

Uses shadcn and tailwindcss to build a UI component library and a Storybook app.

All components are declared inside the ui package , inside src/components/ui folder e.g. button.tsx.

Adding new components with shadcn Ui

example:

cd packages/ui
pnpm dlx shadcn@latest add accordion

Export the components in index.tsx file

// Export all components here to be used by other apps
export * from "./components/ui/button";
export * from "./components/ui/accordion";

for list of components check shadcn components

Storybook

Inside apps/workshop folder, you define a story for each component inside components/ui folder e.g. Button.stories.tsx.

Usage of components on web

Inside apps/web folder, you can use the components by importing the ui package and using the component name e.g. import { Button } from "ui".