feat(storybook): add stories for Auth, Player, Tracks, Dashboard (Batches 22-25)
- Batch 22 (Auth/Settings): OAuthButtons, PasswordStrengthIndicator, ThemeSwitcher, TwoFactorSettings
- Batch 23 (Player): TimeDisplay, RepeatShuffleButtons, NextPreviousButtons, QualitySelector
- Batch 24 (Tracks): LikeButton, TrackFilters, TrackStatsDisplay
- Batch 25 (Dashboard): StatCard
- Fixed build issues with sonner dependencies.
2026-02-02 19:42:51 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
|
import { TimeDisplay } from './TimeDisplay';
|
|
|
|
|
|
|
|
|
|
const meta = {
|
2026-02-05 13:20:06 +00:00
|
|
|
title: 'Components/Features/Player/TimeDisplay',
|
feat(storybook): add stories for Auth, Player, Tracks, Dashboard (Batches 22-25)
- Batch 22 (Auth/Settings): OAuthButtons, PasswordStrengthIndicator, ThemeSwitcher, TwoFactorSettings
- Batch 23 (Player): TimeDisplay, RepeatShuffleButtons, NextPreviousButtons, QualitySelector
- Batch 24 (Tracks): LikeButton, TrackFilters, TrackStatsDisplay
- Batch 25 (Dashboard): StatCard
- Fixed build issues with sonner dependencies.
2026-02-02 19:42:51 +00:00
|
|
|
component: TimeDisplay,
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
} satisfies Meta<typeof TimeDisplay>;
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
export const Default: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
currentTime: 65,
|
|
|
|
|
duration: 240,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const ZeroStates: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
currentTime: 0,
|
|
|
|
|
duration: 0,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const CustomSeparator: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
currentTime: 120,
|
|
|
|
|
duration: 300,
|
|
|
|
|
separator: ' sur ',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const NoSeparator: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
currentTime: 120,
|
|
|
|
|
duration: 300,
|
|
|
|
|
showSeparator: false,
|
|
|
|
|
},
|
|
|
|
|
};
|