sonance-brand-mcp 1.1.4 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/BRAND_GUIDELINES.md +0 -8
- package/dist/assets/components/accordion.stories.tsx +310 -0
- package/dist/assets/components/accordion.tsx +56 -30
- package/dist/assets/components/alert.stories.tsx +199 -0
- package/dist/assets/components/autocomplete.stories.tsx +307 -0
- package/dist/assets/components/autocomplete.tsx +28 -4
- package/dist/assets/components/avatar.stories.tsx +175 -0
- package/dist/assets/components/badge.stories.tsx +258 -0
- package/dist/assets/components/breadcrumbs.stories.tsx +175 -0
- package/dist/assets/components/button.stories.tsx +362 -0
- package/dist/assets/components/button.tsx +48 -3
- package/dist/assets/components/calendar.stories.tsx +247 -0
- package/dist/assets/components/card.stories.tsx +275 -0
- package/dist/assets/components/card.tsx +26 -1
- package/dist/assets/components/checkbox-group.stories.tsx +281 -0
- package/dist/assets/components/checkbox.stories.tsx +160 -0
- package/dist/assets/components/checkbox.tsx +32 -4
- package/dist/assets/components/code.stories.tsx +265 -0
- package/dist/assets/components/date-input.stories.tsx +278 -0
- package/dist/assets/components/date-input.tsx +24 -2
- package/dist/assets/components/date-picker.stories.tsx +337 -0
- package/dist/assets/components/date-picker.tsx +28 -4
- package/dist/assets/components/date-range-picker.stories.tsx +340 -0
- package/dist/assets/components/dialog.stories.tsx +285 -0
- package/dist/assets/components/divider.stories.tsx +176 -0
- package/dist/assets/components/drawer.stories.tsx +216 -0
- package/dist/assets/components/dropdown.stories.tsx +342 -0
- package/dist/assets/components/dropdown.tsx +55 -10
- package/dist/assets/components/form.stories.tsx +372 -0
- package/dist/assets/components/image.stories.tsx +348 -0
- package/dist/assets/components/input-otp.stories.tsx +336 -0
- package/dist/assets/components/input-otp.tsx +24 -2
- package/dist/assets/components/input.stories.tsx +223 -0
- package/dist/assets/components/input.tsx +27 -2
- package/dist/assets/components/kbd.stories.tsx +272 -0
- package/dist/assets/components/link.stories.tsx +199 -0
- package/dist/assets/components/link.tsx +50 -1
- package/dist/assets/components/listbox.stories.tsx +287 -0
- package/dist/assets/components/listbox.tsx +30 -7
- package/dist/assets/components/navbar.stories.tsx +218 -0
- package/dist/assets/components/number-input.stories.tsx +295 -0
- package/dist/assets/components/number-input.tsx +30 -8
- package/dist/assets/components/pagination.stories.tsx +280 -0
- package/dist/assets/components/pagination.tsx +45 -21
- package/dist/assets/components/popover.stories.tsx +219 -0
- package/dist/assets/components/progress.stories.tsx +153 -0
- package/dist/assets/components/radio-group.stories.tsx +187 -0
- package/dist/assets/components/radio-group.tsx +30 -6
- package/dist/assets/components/range-calendar.stories.tsx +334 -0
- package/dist/assets/components/scroll-shadow.stories.tsx +335 -0
- package/dist/assets/components/select.stories.tsx +192 -0
- package/dist/assets/components/select.tsx +54 -7
- package/dist/assets/components/skeleton.stories.tsx +166 -0
- package/dist/assets/components/slider.stories.tsx +145 -0
- package/dist/assets/components/slider.tsx +43 -8
- package/dist/assets/components/spacer.stories.tsx +216 -0
- package/dist/assets/components/spinner.stories.tsx +149 -0
- package/dist/assets/components/switch.stories.tsx +170 -0
- package/dist/assets/components/switch.tsx +29 -4
- package/dist/assets/components/table.stories.tsx +322 -0
- package/dist/assets/components/tabs.stories.tsx +306 -0
- package/dist/assets/components/tabs.tsx +25 -4
- package/dist/assets/components/textarea.stories.tsx +103 -0
- package/dist/assets/components/textarea.tsx +27 -3
- package/dist/assets/components/theme-toggle.stories.tsx +248 -0
- package/dist/assets/components/time-input.stories.tsx +365 -0
- package/dist/assets/components/time-input.tsx +25 -3
- package/dist/assets/components/toast.stories.tsx +195 -0
- package/dist/assets/components/tooltip.stories.tsx +226 -0
- package/dist/assets/components/user.stories.tsx +274 -0
- package/dist/assets/logo-manifest.json +0 -18
- package/dist/index.js +2142 -85
- package/package.json +1 -1
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { forwardRef } from "react";
|
|
3
|
+
import { forwardRef, useId } from "react";
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
|
+
export type SwitchState = "default" | "hover" | "focus" | "checked" | "disabled";
|
|
7
|
+
|
|
6
8
|
interface SwitchProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
|
|
7
9
|
label?: string;
|
|
8
10
|
description?: string;
|
|
11
|
+
/** Visual state for Storybook/Figma documentation */
|
|
12
|
+
state?: SwitchState;
|
|
9
13
|
}
|
|
10
14
|
|
|
15
|
+
// State styles for Storybook/Figma visualization
|
|
16
|
+
const getTrackStateStyles = (state?: SwitchState) => {
|
|
17
|
+
if (!state || state === "default") return "";
|
|
18
|
+
|
|
19
|
+
const stateMap: Record<string, string> = {
|
|
20
|
+
hover: "border-border-hover",
|
|
21
|
+
focus: "ring-2 ring-border-focus ring-offset-2 ring-offset-background",
|
|
22
|
+
checked: "border-primary bg-primary",
|
|
23
|
+
disabled: "opacity-50 cursor-not-allowed",
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
return stateMap[state] || "";
|
|
27
|
+
};
|
|
28
|
+
|
|
11
29
|
export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
12
|
-
({ className, label, description, id, ...props }, ref) => {
|
|
13
|
-
const
|
|
30
|
+
({ className, label, description, id, state, disabled, checked, ...props }, ref) => {
|
|
31
|
+
const uniqueId = useId();
|
|
32
|
+
const inputId = id || `switch-${uniqueId}`;
|
|
33
|
+
const isDisabled = disabled || state === "disabled";
|
|
34
|
+
const isChecked = checked || state === "checked";
|
|
14
35
|
|
|
15
36
|
return (
|
|
16
37
|
<div className="flex items-start gap-3">
|
|
@@ -22,6 +43,7 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
22
43
|
"has-[:checked]:border-primary has-[:checked]:bg-primary",
|
|
23
44
|
"has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50",
|
|
24
45
|
"has-[:focus]:ring-2 has-[:focus]:ring-border-focus has-[:focus]:ring-offset-2 has-[:focus]:ring-offset-background",
|
|
46
|
+
getTrackStateStyles(state),
|
|
25
47
|
className
|
|
26
48
|
)}
|
|
27
49
|
>
|
|
@@ -29,6 +51,8 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
29
51
|
type="checkbox"
|
|
30
52
|
id={inputId}
|
|
31
53
|
ref={ref}
|
|
54
|
+
disabled={isDisabled}
|
|
55
|
+
checked={isChecked}
|
|
32
56
|
className="peer sr-only"
|
|
33
57
|
{...props}
|
|
34
58
|
/>
|
|
@@ -36,7 +60,8 @@ export const Switch = forwardRef<HTMLInputElement, SwitchProps>(
|
|
|
36
60
|
className={cn(
|
|
37
61
|
"pointer-events-none absolute left-0.5 h-5 w-5 rounded-full bg-foreground-muted shadow-sm",
|
|
38
62
|
"transition-transform duration-200",
|
|
39
|
-
"peer-checked:translate-x-5 peer-checked:bg-primary-foreground"
|
|
63
|
+
"peer-checked:translate-x-5 peer-checked:bg-primary-foreground",
|
|
64
|
+
state === "checked" && "translate-x-5 bg-primary-foreground"
|
|
40
65
|
)}
|
|
41
66
|
/>
|
|
42
67
|
</label>
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/nextjs-vite';
|
|
2
|
+
import {
|
|
3
|
+
Table,
|
|
4
|
+
TableHeader,
|
|
5
|
+
TableBody,
|
|
6
|
+
TableFooter,
|
|
7
|
+
TableRow,
|
|
8
|
+
TableHead,
|
|
9
|
+
TableCell,
|
|
10
|
+
TableCaption,
|
|
11
|
+
} from './table';
|
|
12
|
+
import { Badge } from './badge';
|
|
13
|
+
import { Checkbox } from './checkbox';
|
|
14
|
+
|
|
15
|
+
const meta: Meta<typeof Table> = {
|
|
16
|
+
title: 'Components/Data Display/Table',
|
|
17
|
+
component: Table,
|
|
18
|
+
tags: ['autodocs'],
|
|
19
|
+
parameters: {
|
|
20
|
+
docs: {
|
|
21
|
+
description: {
|
|
22
|
+
component: 'A table component for displaying structured data with support for headers, footers, and captions.',
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
layout: 'padded',
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default meta;
|
|
30
|
+
type Story = StoryObj<typeof meta>;
|
|
31
|
+
|
|
32
|
+
const products = [
|
|
33
|
+
{ id: 1, name: 'VP66 TL', category: 'In-Wall', price: 1299.00, status: 'In Stock' },
|
|
34
|
+
{ id: 2, name: 'VP86 TL', category: 'In-Wall', price: 1599.00, status: 'In Stock' },
|
|
35
|
+
{ id: 3, name: 'Garden Series', category: 'Outdoor', price: 899.00, status: 'Low Stock' },
|
|
36
|
+
{ id: 4, name: 'Soundbar 3.0', category: 'Soundbar', price: 2499.00, status: 'Out of Stock' },
|
|
37
|
+
{ id: 5, name: 'Sub 10', category: 'Subwoofer', price: 1199.00, status: 'In Stock' },
|
|
38
|
+
];
|
|
39
|
+
|
|
40
|
+
export const Default: Story = {
|
|
41
|
+
render: () => (
|
|
42
|
+
<Table>
|
|
43
|
+
<TableHeader>
|
|
44
|
+
<TableRow>
|
|
45
|
+
<TableHead>Product</TableHead>
|
|
46
|
+
<TableHead>Category</TableHead>
|
|
47
|
+
<TableHead>Status</TableHead>
|
|
48
|
+
<TableHead className="text-right">Price</TableHead>
|
|
49
|
+
</TableRow>
|
|
50
|
+
</TableHeader>
|
|
51
|
+
<TableBody>
|
|
52
|
+
{products.map((product) => (
|
|
53
|
+
<TableRow key={product.id}>
|
|
54
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
55
|
+
<TableCell>{product.category}</TableCell>
|
|
56
|
+
<TableCell>{product.status}</TableCell>
|
|
57
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
58
|
+
</TableRow>
|
|
59
|
+
))}
|
|
60
|
+
</TableBody>
|
|
61
|
+
</Table>
|
|
62
|
+
),
|
|
63
|
+
};
|
|
64
|
+
|
|
65
|
+
export const WithCaption: Story = {
|
|
66
|
+
render: () => (
|
|
67
|
+
<Table>
|
|
68
|
+
<TableCaption>A list of Sonance products and their availability.</TableCaption>
|
|
69
|
+
<TableHeader>
|
|
70
|
+
<TableRow>
|
|
71
|
+
<TableHead>Product</TableHead>
|
|
72
|
+
<TableHead>Category</TableHead>
|
|
73
|
+
<TableHead>Status</TableHead>
|
|
74
|
+
<TableHead className="text-right">Price</TableHead>
|
|
75
|
+
</TableRow>
|
|
76
|
+
</TableHeader>
|
|
77
|
+
<TableBody>
|
|
78
|
+
{products.slice(0, 3).map((product) => (
|
|
79
|
+
<TableRow key={product.id}>
|
|
80
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
81
|
+
<TableCell>{product.category}</TableCell>
|
|
82
|
+
<TableCell>{product.status}</TableCell>
|
|
83
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
84
|
+
</TableRow>
|
|
85
|
+
))}
|
|
86
|
+
</TableBody>
|
|
87
|
+
</Table>
|
|
88
|
+
),
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
export const WithFooter: Story = {
|
|
92
|
+
render: () => {
|
|
93
|
+
const total = products.reduce((sum, p) => sum + p.price, 0);
|
|
94
|
+
return (
|
|
95
|
+
<Table>
|
|
96
|
+
<TableHeader>
|
|
97
|
+
<TableRow>
|
|
98
|
+
<TableHead>Product</TableHead>
|
|
99
|
+
<TableHead>Category</TableHead>
|
|
100
|
+
<TableHead className="text-right">Price</TableHead>
|
|
101
|
+
</TableRow>
|
|
102
|
+
</TableHeader>
|
|
103
|
+
<TableBody>
|
|
104
|
+
{products.map((product) => (
|
|
105
|
+
<TableRow key={product.id}>
|
|
106
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
107
|
+
<TableCell>{product.category}</TableCell>
|
|
108
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
109
|
+
</TableRow>
|
|
110
|
+
))}
|
|
111
|
+
</TableBody>
|
|
112
|
+
<TableFooter>
|
|
113
|
+
<TableRow>
|
|
114
|
+
<TableCell colSpan={2}>Total</TableCell>
|
|
115
|
+
<TableCell className="text-right font-bold">${total.toFixed(2)}</TableCell>
|
|
116
|
+
</TableRow>
|
|
117
|
+
</TableFooter>
|
|
118
|
+
</Table>
|
|
119
|
+
);
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
export const WithBadges: Story = {
|
|
124
|
+
render: () => (
|
|
125
|
+
<Table>
|
|
126
|
+
<TableHeader>
|
|
127
|
+
<TableRow>
|
|
128
|
+
<TableHead>Product</TableHead>
|
|
129
|
+
<TableHead>Category</TableHead>
|
|
130
|
+
<TableHead>Status</TableHead>
|
|
131
|
+
<TableHead className="text-right">Price</TableHead>
|
|
132
|
+
</TableRow>
|
|
133
|
+
</TableHeader>
|
|
134
|
+
<TableBody>
|
|
135
|
+
{products.map((product) => (
|
|
136
|
+
<TableRow key={product.id}>
|
|
137
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
138
|
+
<TableCell>{product.category}</TableCell>
|
|
139
|
+
<TableCell>
|
|
140
|
+
<Badge
|
|
141
|
+
variant={
|
|
142
|
+
product.status === 'In Stock'
|
|
143
|
+
? 'success'
|
|
144
|
+
: product.status === 'Low Stock'
|
|
145
|
+
? 'warning'
|
|
146
|
+
: 'error'
|
|
147
|
+
}
|
|
148
|
+
>
|
|
149
|
+
{product.status}
|
|
150
|
+
</Badge>
|
|
151
|
+
</TableCell>
|
|
152
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
153
|
+
</TableRow>
|
|
154
|
+
))}
|
|
155
|
+
</TableBody>
|
|
156
|
+
</Table>
|
|
157
|
+
),
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const WithCheckboxes: Story = {
|
|
161
|
+
render: () => (
|
|
162
|
+
<Table>
|
|
163
|
+
<TableHeader>
|
|
164
|
+
<TableRow>
|
|
165
|
+
<TableHead className="w-12">
|
|
166
|
+
<Checkbox />
|
|
167
|
+
</TableHead>
|
|
168
|
+
<TableHead>Product</TableHead>
|
|
169
|
+
<TableHead>Category</TableHead>
|
|
170
|
+
<TableHead className="text-right">Price</TableHead>
|
|
171
|
+
</TableRow>
|
|
172
|
+
</TableHeader>
|
|
173
|
+
<TableBody>
|
|
174
|
+
{products.map((product) => (
|
|
175
|
+
<TableRow key={product.id}>
|
|
176
|
+
<TableCell>
|
|
177
|
+
<Checkbox />
|
|
178
|
+
</TableCell>
|
|
179
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
180
|
+
<TableCell>{product.category}</TableCell>
|
|
181
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
182
|
+
</TableRow>
|
|
183
|
+
))}
|
|
184
|
+
</TableBody>
|
|
185
|
+
</Table>
|
|
186
|
+
),
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
export const Striped: Story = {
|
|
190
|
+
render: () => (
|
|
191
|
+
<Table>
|
|
192
|
+
<TableHeader>
|
|
193
|
+
<TableRow>
|
|
194
|
+
<TableHead>Product</TableHead>
|
|
195
|
+
<TableHead>Category</TableHead>
|
|
196
|
+
<TableHead className="text-right">Price</TableHead>
|
|
197
|
+
</TableRow>
|
|
198
|
+
</TableHeader>
|
|
199
|
+
<TableBody>
|
|
200
|
+
{products.map((product, index) => (
|
|
201
|
+
<TableRow
|
|
202
|
+
key={product.id}
|
|
203
|
+
className={index % 2 === 0 ? 'bg-background-secondary' : ''}
|
|
204
|
+
>
|
|
205
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
206
|
+
<TableCell>{product.category}</TableCell>
|
|
207
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
208
|
+
</TableRow>
|
|
209
|
+
))}
|
|
210
|
+
</TableBody>
|
|
211
|
+
</Table>
|
|
212
|
+
),
|
|
213
|
+
};
|
|
214
|
+
|
|
215
|
+
export const Compact: Story = {
|
|
216
|
+
render: () => (
|
|
217
|
+
<Table>
|
|
218
|
+
<TableHeader>
|
|
219
|
+
<TableRow>
|
|
220
|
+
<TableHead className="py-2">Product</TableHead>
|
|
221
|
+
<TableHead className="py-2">Category</TableHead>
|
|
222
|
+
<TableHead className="py-2 text-right">Price</TableHead>
|
|
223
|
+
</TableRow>
|
|
224
|
+
</TableHeader>
|
|
225
|
+
<TableBody>
|
|
226
|
+
{products.map((product) => (
|
|
227
|
+
<TableRow key={product.id}>
|
|
228
|
+
<TableCell className="py-2 font-medium">{product.name}</TableCell>
|
|
229
|
+
<TableCell className="py-2">{product.category}</TableCell>
|
|
230
|
+
<TableCell className="py-2 text-right">${product.price.toFixed(2)}</TableCell>
|
|
231
|
+
</TableRow>
|
|
232
|
+
))}
|
|
233
|
+
</TableBody>
|
|
234
|
+
</Table>
|
|
235
|
+
),
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
// Responsive Matrix - Mobile, Tablet, Desktop
|
|
239
|
+
export const ResponsiveMatrix: Story = {
|
|
240
|
+
render: () => (
|
|
241
|
+
<div className="space-y-8">
|
|
242
|
+
{/* Mobile */}
|
|
243
|
+
<div>
|
|
244
|
+
<h4 className="text-xs uppercase text-foreground-muted mb-2">Mobile (375px)</h4>
|
|
245
|
+
<div className="w-[375px] border border-dashed border-border p-2 overflow-x-auto">
|
|
246
|
+
<Table>
|
|
247
|
+
<TableHeader>
|
|
248
|
+
<TableRow>
|
|
249
|
+
<TableHead className="py-2 text-xs">Product</TableHead>
|
|
250
|
+
<TableHead className="py-2 text-xs text-right">Price</TableHead>
|
|
251
|
+
</TableRow>
|
|
252
|
+
</TableHeader>
|
|
253
|
+
<TableBody>
|
|
254
|
+
{products.slice(0, 3).map((product) => (
|
|
255
|
+
<TableRow key={product.id}>
|
|
256
|
+
<TableCell className="py-2 text-sm font-medium">{product.name}</TableCell>
|
|
257
|
+
<TableCell className="py-2 text-sm text-right">${product.price.toFixed(2)}</TableCell>
|
|
258
|
+
</TableRow>
|
|
259
|
+
))}
|
|
260
|
+
</TableBody>
|
|
261
|
+
</Table>
|
|
262
|
+
</div>
|
|
263
|
+
</div>
|
|
264
|
+
{/* Tablet */}
|
|
265
|
+
<div>
|
|
266
|
+
<h4 className="text-xs uppercase text-foreground-muted mb-2">Tablet (768px)</h4>
|
|
267
|
+
<div className="w-[768px] border border-dashed border-border p-4">
|
|
268
|
+
<Table>
|
|
269
|
+
<TableHeader>
|
|
270
|
+
<TableRow>
|
|
271
|
+
<TableHead>Product</TableHead>
|
|
272
|
+
<TableHead>Category</TableHead>
|
|
273
|
+
<TableHead className="text-right">Price</TableHead>
|
|
274
|
+
</TableRow>
|
|
275
|
+
</TableHeader>
|
|
276
|
+
<TableBody>
|
|
277
|
+
{products.slice(0, 4).map((product) => (
|
|
278
|
+
<TableRow key={product.id}>
|
|
279
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
280
|
+
<TableCell>{product.category}</TableCell>
|
|
281
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
282
|
+
</TableRow>
|
|
283
|
+
))}
|
|
284
|
+
</TableBody>
|
|
285
|
+
</Table>
|
|
286
|
+
</div>
|
|
287
|
+
</div>
|
|
288
|
+
{/* Desktop */}
|
|
289
|
+
<div>
|
|
290
|
+
<h4 className="text-xs uppercase text-foreground-muted mb-2">Desktop (1280px)</h4>
|
|
291
|
+
<div className="w-[1280px] border border-dashed border-border p-4">
|
|
292
|
+
<Table>
|
|
293
|
+
<TableHeader>
|
|
294
|
+
<TableRow>
|
|
295
|
+
<TableHead className="w-12"><Checkbox /></TableHead>
|
|
296
|
+
<TableHead>Product</TableHead>
|
|
297
|
+
<TableHead>Category</TableHead>
|
|
298
|
+
<TableHead>Status</TableHead>
|
|
299
|
+
<TableHead className="text-right">Price</TableHead>
|
|
300
|
+
</TableRow>
|
|
301
|
+
</TableHeader>
|
|
302
|
+
<TableBody>
|
|
303
|
+
{products.map((product) => (
|
|
304
|
+
<TableRow key={product.id}>
|
|
305
|
+
<TableCell><Checkbox /></TableCell>
|
|
306
|
+
<TableCell className="font-medium">{product.name}</TableCell>
|
|
307
|
+
<TableCell>{product.category}</TableCell>
|
|
308
|
+
<TableCell>
|
|
309
|
+
<Badge variant={product.status === 'In Stock' ? 'success' : product.status === 'Low Stock' ? 'warning' : 'error'}>
|
|
310
|
+
{product.status}
|
|
311
|
+
</Badge>
|
|
312
|
+
</TableCell>
|
|
313
|
+
<TableCell className="text-right">${product.price.toFixed(2)}</TableCell>
|
|
314
|
+
</TableRow>
|
|
315
|
+
))}
|
|
316
|
+
</TableBody>
|
|
317
|
+
</Table>
|
|
318
|
+
</div>
|
|
319
|
+
</div>
|
|
320
|
+
</div>
|
|
321
|
+
),
|
|
322
|
+
};
|