-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
1,127 additions
and
2,325 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,19 @@ | ||
const { mergeConfig } = require('vite') | ||
const path = require('path') | ||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin') | ||
|
||
module.exports = { | ||
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx)'], | ||
staticDirs: ['../public'], | ||
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-interactions'], | ||
|
||
framework: { | ||
name: '@storybook/nextjs', | ||
options: {}, | ||
}, | ||
|
||
features: { | ||
storyStoreV7: true, | ||
options: { | ||
nextConfigPath: '../next.config.js', | ||
builder: { | ||
fsCache: true, | ||
lazyCompilation: true, | ||
}, | ||
}, | ||
}, | ||
|
||
webpackFinal(config) { | ||
const { mergeConfig } = require('vite') | ||
config.resolve.modules = [...(config.resolve.modules || []), path.resolve(__dirname, '../src')] | ||
|
||
config.resolve.plugins = [...(config.resolve.plugins || []), new TsconfigPathsPlugin()] | ||
return mergeConfig(config) | ||
}, | ||
|
||
docs: { | ||
autodocs: true, | ||
automock: 'tag', | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,13 @@ | ||
import { Footer } from './Footer' | ||
|
||
import type { ComponentStory, ComponentMeta } from '@storybook/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
export default { | ||
title: 'containers/Footer', | ||
const meta: Meta<typeof Footer> = { | ||
component: Footer, | ||
argTypes: { | ||
// TODO | ||
}, | ||
} as ComponentMeta<typeof Footer> | ||
} | ||
|
||
const Template: ComponentStory<typeof Footer> = () => <Footer /> | ||
export default meta | ||
|
||
export const Default = Template.bind({}) | ||
type story = StoryObj<typeof Footer> | ||
|
||
Default.args = { | ||
// TODO | ||
} | ||
export const Default: story = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,17 @@ | ||
import { Header } from './Header' | ||
|
||
import type { ComponentStory, ComponentMeta } from '@storybook/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
export default { | ||
const meta: Meta<typeof Header> = { | ||
title: 'containers/Header', | ||
component: Header, | ||
argTypes: { | ||
// TODO | ||
}, | ||
} as ComponentMeta<typeof Header> | ||
} | ||
|
||
const Template: ComponentStory<typeof Header> = () => <Header /> | ||
export default meta | ||
|
||
export const Default = Template.bind({}) | ||
type story = StoryObj<typeof Header> | ||
|
||
Default.args = { | ||
// TODO | ||
} | ||
export const Default: story = {} |
25 changes: 7 additions & 18 deletions
25
src/components/containers/Pagination/Pagination.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,17 @@ | ||
import { Pagination } from './Pagination' | ||
|
||
import type { ComponentStory, ComponentMeta } from '@storybook/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
export default { | ||
title: 'containers/Pagination', | ||
const meta: Meta<typeof Pagination> = { | ||
component: Pagination, | ||
args: { | ||
totalPage: 20, | ||
page: 5, | ||
}, | ||
argTypes: { | ||
totalPage: { | ||
type: Number, | ||
description: '最大ページ数', | ||
control: 'number', | ||
}, | ||
page: { | ||
type: Number, | ||
description: '現在のページ数', | ||
control: 'number', | ||
}, | ||
}, | ||
} as ComponentMeta<typeof Pagination> | ||
} | ||
|
||
export default meta | ||
|
||
const Template: ComponentStory<typeof Pagination> = (args) => <Pagination {...args} /> | ||
type story = StoryObj<typeof Pagination> | ||
|
||
export const Default = Template.bind({}) | ||
export const Default: story = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,13 @@ | ||
import React from 'react' | ||
|
||
import { SiteTop } from './SiteTop' | ||
|
||
import type { ComponentStory, ComponentMeta } from '@storybook/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
export default { | ||
title: 'containers/SiteTop', | ||
const meta: Meta<typeof SiteTop> = { | ||
component: SiteTop, | ||
argTypes: { | ||
// TODO | ||
}, | ||
} as ComponentMeta<typeof SiteTop> | ||
} | ||
|
||
const Template: ComponentStory<typeof SiteTop> = (args) => ( | ||
<div style={{ height: 100 + 'vh' }}> | ||
<SiteTop {...args} /> | ||
</div> | ||
) | ||
export default meta | ||
|
||
export const Default = Template.bind({}) | ||
type story = StoryObj<typeof SiteTop> | ||
|
||
Default.args = { | ||
// TODO | ||
} | ||
export const Default: story = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,17 @@ | ||
import React from 'react' | ||
|
||
import { PageTitle } from './PageTitle' | ||
|
||
import type { ComponentStory, ComponentMeta } from '@storybook/react' | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
|
||
export default { | ||
title: 'parts/PageTitle', | ||
const meta: Meta<typeof PageTitle> = { | ||
component: PageTitle, | ||
args: { | ||
bgText: 'blog', | ||
children: 'TEST', | ||
}, | ||
argTypes: { | ||
// TODO | ||
}, | ||
} as ComponentMeta<typeof PageTitle> | ||
} | ||
|
||
const Template: ComponentStory<typeof PageTitle> = (args) => <PageTitle {...args} /> | ||
export default meta | ||
|
||
export const Default = Template.bind({}) | ||
type story = StoryObj<typeof PageTitle> | ||
|
||
Default.args = { | ||
// TODO | ||
} | ||
export const Default: story = {} |
Oops, something went wrong.