Skip to content

Commit c774939

Browse files
committed
Rules updated
1 parent 7ae5702 commit c774939

File tree

3 files changed

+61
-6
lines changed

3 files changed

+61
-6
lines changed

.cursor/rules/product-component-requirements-mdc/product-detail-component.mdc

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,36 @@ alwaysApply: false
77

88
# Product Detail Component
99

10-
## Data Model
10+
## 🚀 Quick Start (Beginner)
11+
If you're new to product components, start here:
12+
13+
### Basic Product Detail
14+
```jsx
15+
const ProductDetail = ({ product, onAddToCart }) => {
16+
return (
17+
<div className="product-detail">
18+
<img src={product.image} alt={product.name} />
19+
<h1>{product.name}</h1>
20+
<p>{product.description}</p>
21+
<p>Price: {product.price}</p>
22+
<button onClick={() => onAddToCart(product)}>
23+
Add to Cart
24+
</button>
25+
</div>
26+
)
27+
}
28+
```
29+
30+
### Essential Props
31+
- `product`: Product data object
32+
- `onAddToCart`: Function to add product to cart
33+
- `className`: Optional styling
34+
35+
---
36+
37+
## 📋 Full Requirements (Advanced)
38+
39+
### Data Model
1140
- Product
1241
- Product Bundle (parent with child items; only parent can be added to cart)
1342
- Product Set (logical group; all items added to cart together, no parent/child)

.cursor/rules/product-component-requirements-mdc/product-list-component.mdc

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
11
---
2-
description: Product list component requirement template
2+
description: Product list component requirement template
33
globs: "**/components/**"
44
type: agent-requested
55
alwaysApply: false
66
---
77
# Product List Component
88

9+
## 🚀 Quick Start (Beginner)
10+
If you're new to product components, start here:
11+
12+
### Basic Product List
13+
```jsx
14+
const ProductList = ({ products, onAddToCart }) => {
15+
return (
16+
<div className="product-list">
17+
{products.map(product => (
18+
<ProductTile
19+
key={product.id}
20+
product={product}
21+
onAddToCart={onAddToCart}
22+
/>
23+
))}
24+
</div>
25+
)
26+
}
27+
```
28+
29+
### Essential Props
30+
- `products`: Array of product objects
31+
- `onAddToCart`: Function to add product to cart
32+
- `className`: Optional styling
33+
34+
---
35+
36+
## 📋 Full Requirements (Advanced)
37+
938
## Data Model
1039
- Array of Products (single items)
1140
- Array of Product Bundles (parent with child items; only parent can be added to cart)
@@ -22,7 +51,7 @@ alwaysApply: false
2251
- Empty state handling
2352
- Product count display
2453
- View mode persistence
25-
- Responsive grid/list layouts
54+
- Responsive grid/list layout
2655
- Bulk actions (add multiple to cart, wishlist)
2756

2857
## Look & Feel

.cursor/rules/product-component-requirements-mdc/product-tile-component.mdc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ globs: "**/components/**"
44
type: agent-requested
55
alwaysApply: false
66
---
7-
name: Product Tile Component
8-
description: Requirements and examples for creating product tile components (cards, grid items)
9-
globs: ["**/components/**"]
107

118
# Product Tile Component
129

0 commit comments

Comments
 (0)