Skip to content

Commit

Permalink
fix: storybookのバージョンを最新に修正
Browse files Browse the repository at this point in the history
  • Loading branch information
imaimai17468 committed Aug 18, 2023
1 parent 276117e commit 687d4b4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
9 changes: 9 additions & 0 deletions src/components/AudioVisualizer/AudioVisualizer.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,12 @@
border: 1px solid #ccc;
border-radius: 5px;
}

.story-container-full {
width: 100%;
height: 100px;
background-color: #fff;
padding: 5px;
border: 1px solid #ccc;
border-radius: 5px;
}
33 changes: 23 additions & 10 deletions src/components/AudioVisualizer/AudioVisualizer.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,31 @@
import React from 'react'
import { ComponentStory, ComponentMeta } from '@storybook/react'
import { Meta, StoryObj } from '@storybook/react'
import AudioVisualizer from './AudioVisualizer'
import styles from './AudioVisualizer.module.css'

export default {
title: 'components/AudioVisualizer',
const meta: Meta<typeof AudioVisualizer> = {
title: 'common/AudioVisualizer',
component: AudioVisualizer,
tags: ['autodocs'],
argTypes: {},
} as ComponentMeta<typeof AudioVisualizer>
}
export default meta
type Story = StoryObj<typeof AudioVisualizer>

const Template: ComponentStory<typeof AudioVisualizer> = () => (
<div className={styles['story-container']}>
<AudioVisualizer />
</div>
)
export const Default: Story = {
args: {},
render: () => (
<div className={styles['story-container-full']}>
<AudioVisualizer />
</div>
),
}

export const Default = Template.bind({})
export const FixedWidth: Story = {
args: {},
render: () => (
<div className={styles['story-container']}>
<AudioVisualizer />
</div>
),
}

0 comments on commit 687d4b4

Please sign in to comment.