Skip to content

Feature/on reset #388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jul 12, 2020
Prev Previous commit
Next Next commit
cleanup stories
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed Jul 12, 2020
commit fec562f7a21902159c076853890c2fed25dea9c7
2 changes: 1 addition & 1 deletion web-app/stories/Tests.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ import SideBarDecorator from './utils/SideBarDecorator'

storiesOf('Test Message', module)
.addDecorator(SideBarDecorator)
.add('Fail', () => <TestMessage content={'Test failed for some reason'} />)
.add('Fail', () => <TestMessage message={'Test failed for some reason'} />)
10 changes: 0 additions & 10 deletions web-app/stories/Tutorial.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'COMPLETE',
hints: ['First Hint', 'Second Hint'],
},
{
Expand All @@ -68,7 +67,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'COMPLETE',
},
{
id: '1.3',
Expand All @@ -79,7 +77,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'COMPLETE',
},
],
},
Expand All @@ -100,7 +97,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'COMPLETE',
hints: ['first hint', 'second hint'],
},
{
Expand All @@ -112,7 +108,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'ACTIVE',
hints: ['another hint', 'another other hint'],
},
{
Expand All @@ -124,7 +119,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'INCOMPLETE',
},
],
},
Expand All @@ -134,7 +128,6 @@ const context: Partial<T.MachineContext> = {
summary: 'A summary of the 3rd level',
content: 'Should support markdown test\n ```js\nvar a = 1\n```\nwhew it works!',
setup: null,
status: 'INCOMPLETE',
steps: [
{
id: '3.1',
Expand All @@ -145,7 +138,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'INCOMPLETE',
},
{
id: '3.2',
Expand All @@ -156,7 +148,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'INCOMPLETE',
},
{
id: '3.3',
Expand All @@ -167,7 +158,6 @@ const context: Partial<T.MachineContext> = {
solution: {
commits: ['hijklmn'],
},
status: 'INCOMPLETE',
},
],
},
Expand Down
15 changes: 0 additions & 15 deletions web-app/stories/utils/ApolloDecorator.tsx

This file was deleted.

15 changes: 15 additions & 0 deletions web-app/stories/utils/ProviderDecorator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import React, { Fragment } from 'react'
import { ConfigProvider } from '@alifd/next'
import enUS from '@alifd/next/lib/locale/en-us'

export function Provider({ children }) {
return (
<ConfigProvider locale={enUS}>
<Fragment>{children}</Fragment>
</ConfigProvider>
)
}

export default (story) => {
return <Provider>{story()}</Provider>
}
7 changes: 6 additions & 1 deletion web-app/stories/utils/SideBarDecorator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react'
import { css, jsx } from '@emotion/core'
import { Provider } from './ProviderDecorator'

const styles = {
container: {
Expand All @@ -14,6 +15,10 @@ const styles = {
},
}

const SideBarDecorator = (storyFn) => <div css={styles.container}>{storyFn()}</div>
const SideBarDecorator = (storyFn) => (
<Provider>
<div css={styles.container}>{storyFn()}</div>
</Provider>
)

export default SideBarDecorator