Skip to content

Commit fec562f

Browse files
committed
cleanup stories
Signed-off-by: shmck <[email protected]>
1 parent 72771c4 commit fec562f

File tree

5 files changed

+22
-27
lines changed

5 files changed

+22
-27
lines changed

Diff for: web-app/stories/Tests.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ import SideBarDecorator from './utils/SideBarDecorator'
55

66
storiesOf('Test Message', module)
77
.addDecorator(SideBarDecorator)
8-
.add('Fail', () => <TestMessage content={'Test failed for some reason'} />)
8+
.add('Fail', () => <TestMessage message={'Test failed for some reason'} />)

Diff for: web-app/stories/Tutorial.stories.tsx

-10
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const context: Partial<T.MachineContext> = {
5656
solution: {
5757
commits: ['hijklmn'],
5858
},
59-
status: 'COMPLETE',
6059
hints: ['First Hint', 'Second Hint'],
6160
},
6261
{
@@ -68,7 +67,6 @@ const context: Partial<T.MachineContext> = {
6867
solution: {
6968
commits: ['hijklmn'],
7069
},
71-
status: 'COMPLETE',
7270
},
7371
{
7472
id: '1.3',
@@ -79,7 +77,6 @@ const context: Partial<T.MachineContext> = {
7977
solution: {
8078
commits: ['hijklmn'],
8179
},
82-
status: 'COMPLETE',
8380
},
8481
],
8582
},
@@ -100,7 +97,6 @@ const context: Partial<T.MachineContext> = {
10097
solution: {
10198
commits: ['hijklmn'],
10299
},
103-
status: 'COMPLETE',
104100
hints: ['first hint', 'second hint'],
105101
},
106102
{
@@ -112,7 +108,6 @@ const context: Partial<T.MachineContext> = {
112108
solution: {
113109
commits: ['hijklmn'],
114110
},
115-
status: 'ACTIVE',
116111
hints: ['another hint', 'another other hint'],
117112
},
118113
{
@@ -124,7 +119,6 @@ const context: Partial<T.MachineContext> = {
124119
solution: {
125120
commits: ['hijklmn'],
126121
},
127-
status: 'INCOMPLETE',
128122
},
129123
],
130124
},
@@ -134,7 +128,6 @@ const context: Partial<T.MachineContext> = {
134128
summary: 'A summary of the 3rd level',
135129
content: 'Should support markdown test\n ```js\nvar a = 1\n```\nwhew it works!',
136130
setup: null,
137-
status: 'INCOMPLETE',
138131
steps: [
139132
{
140133
id: '3.1',
@@ -145,7 +138,6 @@ const context: Partial<T.MachineContext> = {
145138
solution: {
146139
commits: ['hijklmn'],
147140
},
148-
status: 'INCOMPLETE',
149141
},
150142
{
151143
id: '3.2',
@@ -156,7 +148,6 @@ const context: Partial<T.MachineContext> = {
156148
solution: {
157149
commits: ['hijklmn'],
158150
},
159-
status: 'INCOMPLETE',
160151
},
161152
{
162153
id: '3.3',
@@ -167,7 +158,6 @@ const context: Partial<T.MachineContext> = {
167158
solution: {
168159
commits: ['hijklmn'],
169160
},
170-
status: 'INCOMPLETE',
171161
},
172162
],
173163
},

Diff for: web-app/stories/utils/ApolloDecorator.tsx

-15
This file was deleted.

Diff for: web-app/stories/utils/ProviderDecorator.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React, { Fragment } from 'react'
2+
import { ConfigProvider } from '@alifd/next'
3+
import enUS from '@alifd/next/lib/locale/en-us'
4+
5+
export function Provider({ children }) {
6+
return (
7+
<ConfigProvider locale={enUS}>
8+
<Fragment>{children}</Fragment>
9+
</ConfigProvider>
10+
)
11+
}
12+
13+
export default (story) => {
14+
return <Provider>{story()}</Provider>
15+
}

Diff for: web-app/stories/utils/SideBarDecorator.tsx

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as React from 'react'
22
import { css, jsx } from '@emotion/core'
3+
import { Provider } from './ProviderDecorator'
34

45
const styles = {
56
container: {
@@ -14,6 +15,10 @@ const styles = {
1415
},
1516
}
1617

17-
const SideBarDecorator = (storyFn) => <div css={styles.container}>{storyFn()}</div>
18+
const SideBarDecorator = (storyFn) => (
19+
<Provider>
20+
<div css={styles.container}>{storyFn()}</div>
21+
</Provider>
22+
)
1823

1924
export default SideBarDecorator

0 commit comments

Comments
 (0)