2026-02-03 08:56:11 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
feat(web): update all features, stories, e2e tests, and auth interceptor
Update auth, playlists, tracks, search, profile, dashboard, player,
settings, and social features. Add e2e audit specs for all major pages.
Update ESLint config, vitest config, and route configuration.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 17:16:36 +00:00
|
|
|
import { fn } from 'storybook/test';
|
2026-02-03 08:56:11 +00:00
|
|
|
import { BanUserModal } from './BanUserModal';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* BanUserModal - Modal de suspension d'utilisateur
|
|
|
|
|
*
|
|
|
|
|
* Modal permettant de configurer et confirmer la suspension
|
|
|
|
|
* d'un utilisateur avec raison, durée et notes internes.
|
|
|
|
|
*/
|
|
|
|
|
const meta: Meta<typeof BanUserModal> = {
|
2026-02-05 13:20:06 +00:00
|
|
|
title: 'Components/Features/Admin/Modals/BanUserModal',
|
2026-02-03 08:56:11 +00:00
|
|
|
component: BanUserModal,
|
|
|
|
|
parameters: {
|
|
|
|
|
layout: 'centered',
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
component: 'Modal de suspension avec options temporaire/permanent et raisons prédéfinies.',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
args: {
|
|
|
|
|
username: 'troublemaker_user',
|
|
|
|
|
onClose: fn(),
|
|
|
|
|
onConfirm: fn(),
|
|
|
|
|
},
|
|
|
|
|
argTypes: {
|
|
|
|
|
username: {
|
|
|
|
|
control: 'text',
|
|
|
|
|
description: 'Nom d\'utilisateur à suspendre',
|
|
|
|
|
},
|
|
|
|
|
onClose: {
|
|
|
|
|
action: 'onClose',
|
|
|
|
|
description: 'Callback appelé à la fermeture',
|
|
|
|
|
},
|
|
|
|
|
onConfirm: {
|
|
|
|
|
action: 'onConfirm',
|
|
|
|
|
description: 'Callback appelé à la confirmation avec (reason, details, duration)',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
2026-02-07 14:10:32 +00:00
|
|
|
<div className="bg-background min-h-screen flex items-center justify-center">
|
2026-02-03 08:56:11 +00:00
|
|
|
<Story />
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* État par défaut de la modal.
|
|
|
|
|
*/
|
|
|
|
|
export const Default: Story = {
|
|
|
|
|
name: 'Par défaut',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Étape de confirmation avant suspension.
|
|
|
|
|
*/
|
|
|
|
|
export const Confirm: Story = {
|
|
|
|
|
name: 'Confirmation',
|
|
|
|
|
args: {
|
|
|
|
|
username: 'spammer_account',
|
|
|
|
|
},
|
|
|
|
|
parameters: {
|
|
|
|
|
docs: {
|
|
|
|
|
description: {
|
|
|
|
|
story: 'Prêt à confirmer la suspension de l\'utilisateur.',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
};
|