aboutsummaryrefslogtreecommitdiff
path: root/packages/components/README.md
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2025-01-21 10:16:51 -0500
committerbobzel <zzzman@gmail.com>2025-01-21 10:16:51 -0500
commitcaf384bb374c47118296aa397446e85d3121116b (patch)
treeda270043f88d6cfa0d6b8f1838a55f6faba35bfa /packages/components/README.md
parent22daafa9c505eb9bffb8604be0924a7450d20113 (diff)
parenta6a6929501b7ce9b3ceed73c7e8141a8d8f0c7dc (diff)
Merge branch 'master' into alyssa-agent
Diffstat (limited to 'packages/components/README.md')
-rw-r--r--packages/components/README.md79
1 files changed, 79 insertions, 0 deletions
diff --git a/packages/components/README.md b/packages/components/README.md
new file mode 100644
index 000000000..9721cffa6
--- /dev/null
+++ b/packages/components/README.md
@@ -0,0 +1,79 @@
+# Dash Component Library
+
+A shared component library for the Dash web application.
+
+## Quick Start
+
+1. Install dependencies:
+
+ ```bash
+ npm install
+ ```
+
+2. Run Storybook to view components:
+ ```bash
+ npm run storybook
+ ```
+ Visit `http://localhost:6006`
+
+## Development
+
+### Available Scripts
+
+- `npm run storybook` - Start Storybook development server
+- `npm run build-storybook` - Build Storybook for production
+
+### Creating New Components
+
+1. Create a new component directory in `src/components`
+2. Include:
+ - Component file (`.tsx`)
+ - Stories file (`.stories.tsx`)
+ - Styles file (`.scss`)
+
+### Using SCSS
+
+- Component styles should be placed in `.scss` files
+- Use CSS Modules to avoid style conflicts
+- Import styles in your component:
+ ```typescript
+ import styles from './YourComponent.scss';
+ ```
+
+## Usage in Main Dash Application
+
+### Importing Components
+
+```typescript
+// Import specific components
+import { Button } from '@dash/components';
+
+// Usage
+function MyComponent() {
+ return (
+ <Button variant="primary">Click me</Button>
+ );
+}
+```
+
+## Component Guidelines
+
+- Each component should be fully typed with TypeScript
+- Include PropTypes and default props
+- Write stories for all component variants
+- Include unit tests for component logic
+- Follow the established design system
+- Document props and usage in stories
+
+## Project Structure
+
+```
+packages/components/
+├── .storybook/ # Storybook configuration
+├── src/
+│ ├── components/ # React components
+│ ├── styles/ # Shared styles
+│ └── utils/ # Utility functions
+├── package.json
+└── tsconfig.json
+```