veza/apps/web/src/features/player/components/PlayerControls.stories.tsx

51 lines
1.1 KiB
TypeScript
Raw Normal View History

import type { Meta, StoryObj } from '@storybook/react';
import { PlayerControls } from './PlayerControls';
const meta: Meta = {
title: 'Components/Features/Player/PlayerControls',
component: PlayerControls,
tags: ['autodocs'],
argTypes: {
onPlayPause: { action: 'play/pause' },
onNext: { action: 'next' },
onPrevious: { action: 'previous' },
onShuffle: { action: 'shuffle' },
onRepeat: { action: 'repeat' },
},
decorators: [
(Story) => (
<div className="p-8 bg-card flex justify-center rounded-xl">
<Story />
</div>
),
],
};
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,
},
};