Skip to content

Commit

Permalink
storybook修正
Browse files Browse the repository at this point in the history
  • Loading branch information
YamazakiYusuke committed Jul 10, 2023
1 parent 392d35a commit e9902f7
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
16 changes: 8 additions & 8 deletions src/stories/Board.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,54 +11,54 @@ export const Empty = Template.bind({})
Empty.args = {
xIsNext: true,
squares: Array(9).fill(null),
onplay: () => null
onPlay: () => null
}

export const AllRound = Template.bind({})
AllRound.args = {
xIsNext: true,
squares: Array(9).fill('O'),
onplay: () => null
onPlay: () => null
}

export const AllCross = Template.bind({})
AllCross.args = {
xIsNext: true,
squares: Array(9).fill('X'),
onplay: () => null
onPlay: () => null
}

export const AllTriangle = Template.bind({})
AllTriangle.args = {
xIsNext: true,
squares: Array(9).fill('△'),
onplay: () => null
onPlay: () => null
}

export const RoundAndCross = Template.bind({})
RoundAndCross.args = {
xIsNext: true,
squares: ['X', 'O', 'X', 'X', 'O', 'O', 'O', 'X', 'O',],
onplay: () => null
onPlay: () => null
}

export const RoundAndTriangle = Template.bind({})
RoundAndTriangle.args = {
xIsNext: true,
squares: ['△', 'O', '△', '△', 'O', 'O', 'O', '△', 'O',],
onplay: () => null
onPlay: () => null
}

export const CrossAndTriangle = Template.bind({})
CrossAndTriangle.args = {
xIsNext: true,
squares: ['X', '△', 'X', 'X', '△', '△', '△', 'X', '△',],
onplay: () => null
onPlay: () => null
}

export const RoundAndCrossAndTriangle = Template.bind({})
RoundAndCrossAndTriangle.args = {
xIsNext: true,
squares: ['X', 'O', 'O', '△', 'O', '△', 'X', 'X', '△',],
onplay: () => null
onPlay: () => null
}
6 changes: 1 addition & 5 deletions src/stories/Game.stories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Game from '../components/Game';
import PropTypes from 'prop-types';

export default {
title: 'Game',
Expand All @@ -8,7 +7,4 @@ export default {

const Template = args => <Game {...args} />

export const Empty = Template.bind()
Empty.args = {
value: ''
}
export const Default = Template.bind()
2 changes: 1 addition & 1 deletion src/stories/Square.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ SelectedByTriangle.args = {
value: '△'
}

Template.prototype = {
Template.propTypes = {
value: PropTypes.oneOf(['', 'O', 'X', '△'])
}

0 comments on commit e9902f7

Please sign in to comment.