66 lines
1.3 KiB
TypeScript
66 lines
1.3 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { UploadView, UploadViewSkeleton } from './UploadView';
|
|
|
|
const meta: Meta<typeof UploadView> = {
|
|
title: 'Components/Features/Views/UploadView',
|
|
component: UploadView,
|
|
parameters: {
|
|
layout: 'fullscreen',
|
|
docs: {
|
|
description: {
|
|
component:
|
|
'Vue Upload Studio : étapes Upload, Metadata, Review, Publish.',
|
|
},
|
|
},
|
|
},
|
|
tags: ['autodocs'],
|
|
decorators: [
|
|
(Story) => (
|
|
<div className="bg-background min-h-layout-main">
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
name: 'Par défaut',
|
|
};
|
|
|
|
export const Loading: Story = {
|
|
name: 'Chargement',
|
|
render: () => <UploadViewSkeleton />,
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
story: 'Skeleton de la vue Upload (stepper + zone carte).',
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export const Empty: Story = {
|
|
name: 'Vide',
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
story: "État initial sans fichiers (même rendu que Par défaut).",
|
|
},
|
|
},
|
|
},
|
|
};
|
|
|
|
export const Error: Story = {
|
|
name: 'Erreur',
|
|
parameters: {
|
|
docs: {
|
|
description: {
|
|
story:
|
|
"En cas d'échec d'upload (réseau ou serveur), la carte du fichier affiche le statut error.",
|
|
},
|
|
},
|
|
},
|
|
};
|