- rounded-[var(--radius-xl/md/lg/sm)] → rounded-xl, rounded-md, rounded-lg, rounded-sm - Timeline: min-w-[200px] → min-w-50 - AddEquipmentView, MetadataForm: min-h-[100px] → min-h-25 - NavigationProgress: shadow-[...] → shadow-button-primary-glow - Stories: ActivityGraph, StatCard, NotificationBell, LoadingState, ScrollArea, Skeleton, FileUploadZone - Reduced arbitrary values from ~60+ to 11 (5 files, exceptions documented) Co-authored-by: Cursor <cursoragent@cursor.com>
68 lines
1.9 KiB
TypeScript
68 lines
1.9 KiB
TypeScript
import type { Meta, StoryObj } from '@storybook/react';
|
|
import { TrackSearchResults } from './TrackSearchResults';
|
|
|
|
const meta: Meta<typeof TrackSearchResults> = {
|
|
title: 'Components/Features/Tracks/TrackSearchResults',
|
|
component: TrackSearchResults,
|
|
parameters: { layout: 'padded' },
|
|
tags: ['autodocs'],
|
|
decorators: [
|
|
(Story) => (
|
|
<div className="w-full max-w-4xl p-4 bg-background border border-border rounded-xl min-h-layout-story">
|
|
<Story />
|
|
</div>
|
|
),
|
|
],
|
|
};
|
|
|
|
export default meta;
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
export const Default: Story = {
|
|
name: 'Par défaut',
|
|
args: {
|
|
tracks: [
|
|
{
|
|
id: '1', title: 'Track 1', artist: 'Artist 1', duration: 180,
|
|
cover_url: 'https://picsum.photos/200',
|
|
play_count: 100, like_count: 10,
|
|
created_at: '2024-01-01', user_id: 'u1', genre: 'Pop',
|
|
is_liked: false, user: { id: 'u1', username: 'User 1', avatar_url: '' }
|
|
} as any,
|
|
{
|
|
id: '2', title: 'Track 2', artist: 'Artist 2', duration: 200,
|
|
cover_url: 'https://picsum.photos/201',
|
|
play_count: 200, like_count: 20,
|
|
created_at: '2024-01-02', user_id: 'u1', genre: 'Rock',
|
|
is_liked: true, user: { id: 'u1', username: 'User 1', avatar_url: '' }
|
|
} as any
|
|
],
|
|
total: 2,
|
|
page: 1,
|
|
limit: 20,
|
|
onPageChange: () => { },
|
|
}
|
|
};
|
|
|
|
export const Empty: Story = {
|
|
name: 'Vide',
|
|
args: {
|
|
tracks: [],
|
|
total: 0,
|
|
page: 1,
|
|
limit: 20,
|
|
onPageChange: () => { },
|
|
}
|
|
};
|
|
|
|
export const Loading: Story = {
|
|
name: 'Chargement',
|
|
args: {
|
|
tracks: [],
|
|
total: 0,
|
|
page: 1,
|
|
limit: 20,
|
|
onPageChange: () => { },
|
|
loading: true,
|
|
}
|
|
};
|