Skip to content
Merged
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
fix storyboook steps
  • Loading branch information
ShMcK committed Oct 26, 2019
commit 9487160b03c4b37192e432908a7a397e086eb4ed
19 changes: 14 additions & 5 deletions web-app/stories/Step.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import React from 'react'

import { boolean, text, withKnobs } from '@storybook/addon-knobs'
import { select, boolean, text, withKnobs } from '@storybook/addon-knobs'
import { storiesOf } from '@storybook/react'
import SideBarDecorator from './utils/SideBarDecorator'

import Step from '../src/containers/Tutorial/LevelPage/Level/StepDescription'
import StepDescription from '../src/containers/Tutorial/LevelPage/Level/StepDescription'

const stepText =
'This is a long paragraph of step text intended to wrap around the side after a short period of writing to demonstrate text wrap among other things'
Expand Down Expand Up @@ -32,6 +32,15 @@ const paragraphText = `Markdown included \`code\`, *bold*, & _italics_.
storiesOf('Tutorial SideBar', module)
.addDecorator(SideBarDecorator)
.addDecorator(withKnobs)
.add('Step', () => <div>Step</div>)
// .add('Step', () => <Step text={text('text', stepText)} hide={boolean('hide', false)} />)
// .add('Step Markdown', () => <Step text={text('text', paragraphText)} hide={boolean('hide', false)} />)
.add('Step Description', () => (
<StepDescription
text={text('text', stepText)}
mode={select('mode', { active: 'ACTIVE', complete: 'COMPLETE', incomplete: 'INCOMPLETE' }, 'active', 'step')}
/>
))
.add('Step Markdown', () => (
<StepDescription
text={text('text', paragraphText)}
mode={select('mode', { active: 'ACTIVE', complete: 'COMPLETE', incomplete: 'INCOMPLETE' }, 'active', 'step')}
/>
))