Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup step stories
Signed-off-by: shmck <[email protected]>
  • Loading branch information
ShMcK committed Jul 11, 2020
commit e9b4c5dadb93a36bff1a7ddee32d76a6ce048d78
4 changes: 2 additions & 2 deletions web-app/src/containers/Tutorial/components/Step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ interface Props {
status: T.ProgressStatus
subtasks: { name: string; pass: boolean }[] | null
hints?: string[]
hintIndex: number
setHintIndex(value: number): void
hintIndex?: number
setHintIndex?(value: number): void
onLoadSolution(): void
}

Expand Down
10 changes: 6 additions & 4 deletions web-app/stories/Step.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ storiesOf('Step', module)
.addDecorator(withKnobs)
.add('Active Step', () => (
<Step
order={1}
index={1}
content={text('text', stepText)}
status="ACTIVE"
onLoadSolution={action('onLoadSolution')}
Expand All @@ -69,7 +69,7 @@ storiesOf('Step', module)
))
.add('Step Markdown', () => (
<Step
order={2}
index={2}
content={text('text', paragraphText)}
status={select('mode', { ACTIVE: 'ACTIVE', COMPLETE: 'COMPLETE', INCOMPLETE: 'INCOMPLETE' }, 'ACTIVE', 'step')}
onLoadSolution={action('onLoadSolution')}
Expand All @@ -78,7 +78,7 @@ storiesOf('Step', module)
))
.add('Substasks', () => (
<Step
order={2}
index={2}
content={'A task with subtasks'}
status={select('mode', { ACTIVE: 'ACTIVE', COMPLETE: 'COMPLETE', INCOMPLETE: 'INCOMPLETE' }, 'ACTIVE', 'step')}
onLoadSolution={action('onLoadSolution')}
Expand All @@ -100,11 +100,13 @@ storiesOf('Step', module)
))
.add('Hints', () => (
<Step
order={1}
index={1}
content={text('text', stepText)}
status="ACTIVE"
onLoadSolution={action('onLoadSolution')}
subtasks={null}
hints={['First hint!', 'Second hint!']}
hintIndex={0}
setHintIndex={action('setHintIndex')}
/>
))