What problem does it solve?
This Skill helps frontend teams standardize and accelerate the creation of new UI components within packages/ui, ensuring consistent structure, tests, and documentation through stories.
Core Features & Use Cases
- Component Structure: Defines the standard folder layout for a component, including implementation, tests, and re-exports.
- Testing & Stories: Enforces test coverage and Storybook stories to accompany every new component.
- Avoidance Practices: Encourages reuse and consistency to prevent duplication and divergence across the design system.
- Use Case: When adding a new component MyComponent, follow the pattern to place files under packages/ui/src/components/MyComponent/ and export from the central index.
Quick Start
Create a new component under packages/ui/src/components/MyComponent/, implement MyComponent.tsx, add MyComponent.test.tsx, create index.ts, export it from packages/ui/src/components/index.ts, and add a Storybook story at packages/storybook/src/MyComponent.stories.tsx.