- types.ts: LicenseConfig - useCreateProductView: form state, updateLicense, handlePublish, handleSaveDraft - CreateProductViewHeader, CoverCard, FilesCard, DetailsCard, PricingCard - CreateProductViewSkeleton for Loading state - Textarea min-h-24 (no arbitrary value) - MSW: POST marketplace/products for Storybook - Stories: Default, Loading (Skeleton) - Re-export from CreateProductView.tsx Co-authored-by: Cursor <cursoragent@cursor.com>
28 lines
694 B
TypeScript
28 lines
694 B
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { CreateProductView } from './CreateProductView';
|
|
import { CreateProductViewSkeleton } from './create-product-view';
|
|
|
|
const meta: Meta<typeof CreateProductView> = {
|
|
title: 'Components/Seller/CreateProductView',
|
|
component: CreateProductView,
|
|
parameters: { layout: 'fullscreen' },
|
|
tags: ['autodocs'],
|
|
decorators: [
|
|
(Story) => (
|
|
<div className="min-h-layout-page-sm p-4">
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
};
|
|
|
|
export default meta;
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {};
|
|
|
|
export const Loading: Story = {
|
|
name: 'Loading',
|
|
render: () => <CreateProductViewSkeleton />,
|
|
};
|