2026-02-02 19:55:57 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
|
import { PlayerControls } from './PlayerControls';
|
|
|
|
|
|
2026-02-12 23:32:08 +00:00
|
|
|
const meta: Meta = {
|
2026-02-05 13:20:06 +00:00
|
|
|
title: 'Components/Features/Player/PlayerControls',
|
2026-02-02 19:55:57 +00:00
|
|
|
component: PlayerControls,
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
argTypes: {
|
|
|
|
|
onPlayPause: { action: 'play/pause' },
|
|
|
|
|
onNext: { action: 'next' },
|
|
|
|
|
onPrevious: { action: 'previous' },
|
|
|
|
|
onShuffle: { action: 'shuffle' },
|
|
|
|
|
onRepeat: { action: 'repeat' },
|
|
|
|
|
},
|
|
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
2026-02-07 14:10:32 +00:00
|
|
|
<div className="p-8 bg-card flex justify-center rounded-xl">
|
2026-02-02 19:55:57 +00:00
|
|
|
<Story />
|
|
|
|
|
</div>
|
|
|
|
|
),
|
|
|
|
|
],
|
2026-02-12 23:32:08 +00:00
|
|
|
};
|
2026-02-02 19:55:57 +00:00
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof meta>;
|
|
|
|
|
|
|
|
|
|
export const Playing: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
isPlaying: true,
|
|
|
|
|
shuffle: false,
|
|
|
|
|
repeat: 'off',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Paused: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
isPlaying: false,
|
|
|
|
|
shuffle: true,
|
|
|
|
|
repeat: 'track',
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const Expanded: Story = {
|
|
|
|
|
args: {
|
|
|
|
|
isPlaying: true,
|
|
|
|
|
shuffle: false,
|
|
|
|
|
repeat: 'off',
|
|
|
|
|
isExpanded: true,
|
|
|
|
|
},
|
|
|
|
|
};
|