mirror of https://github.com/buster-so/buster.git
26 lines
996 B
Plaintext
26 lines
996 B
Plaintext
## Directory Structure
|
|
Each feature component should be organized in its own directory using the following structure:
|
|
|
|
```
|
|
features/
|
|
└── ComponentName/
|
|
├── ComponentName.tsx # Main component implementation
|
|
├── ComponentName.test.tsx # Tests for the component (if asked for it)
|
|
├── ComponentName.stories.tsx # Storybook stories for the component
|
|
└── index.ts # Exports the component and its types
|
|
```
|
|
|
|
## Naming Conventions
|
|
// ... existing code ...
|
|
|
|
## Component Guidelines
|
|
1. Feature components should:
|
|
- Import basic UI components from `../ui/{component_directory}/{component_name}`
|
|
- Be functional components using React hooks
|
|
- Handle their own state management when necessary
|
|
- Be fully typed using TypeScript
|
|
- Include proper documentation and props interface
|
|
- Have a corresponding Storybook story showcasing different states and variations
|
|
|
|
2. Components should be:
|
|
// ... existing code ... |