File tree 3 files changed +75
-19
lines changed
3 files changed +75
-19
lines changed Original file line number Diff line number Diff line change
1
+ import * as React from 'react'
2
+ import { Message as AlifdMessage } from '@alifd/next'
3
+
4
+ interface Process {
5
+ title : string
6
+ description : string
7
+ }
8
+
9
+ interface Props {
10
+ processes : Process [ ]
11
+ }
12
+
13
+ const styles = {
14
+ container : {
15
+ display : 'flex' ,
16
+ flexDirection : 'column' as 'column' ,
17
+ } ,
18
+ }
19
+
20
+ const Processes = ( props : Props ) => (
21
+ < div style = { styles . container } >
22
+ { props . processes . map ( process => (
23
+ < AlifdMessage key = { process . title } type = "loading" size = "medium" title = { process . title } >
24
+ { process . description } ...
25
+ </ AlifdMessage >
26
+ ) ) }
27
+ </ div >
28
+ )
29
+
30
+ export default Processes
Original file line number Diff line number Diff line change @@ -5,24 +5,21 @@ import SideBarDecorator from './utils/SideBarDecorator'
5
5
import Checkbox from '../src/components/Checkbox'
6
6
7
7
const styles = {
8
- container : {
9
- display : 'flex' as 'flex' ,
10
- flexDirection : 'column' as 'column' ,
11
- } ,
8
+ container : {
9
+ display : 'flex' as 'flex' ,
10
+ flexDirection : 'column' as 'column' ,
11
+ } ,
12
12
}
13
13
14
- storiesOf ( 'Checkbox' , module )
15
- . addDecorator ( SideBarDecorator )
16
- . add ( 'Checkboxes' , ( ) => (
17
- < div style = { styles . container } >
18
- < span >
19
- < Checkbox status = "COMPLETE" /> Checked
20
- </ span >
21
- < span >
22
- < Checkbox status = "INCOMPLETE" /> Unchecked
23
- </ span >
24
- < span >
25
- < Checkbox status = "LOADING" /> Loading
26
- </ span >
27
- </ div >
28
- ) )
14
+ storiesOf ( 'Components' , module )
15
+ . addDecorator ( SideBarDecorator )
16
+ . add ( 'Checkboxes' , ( ) => (
17
+ < div style = { styles . container } >
18
+ < span >
19
+ < Checkbox status = "COMPLETE" /> Checked
20
+ </ span >
21
+ < span >
22
+ < Checkbox status = "INCOMPLETE" /> Unchecked
23
+ </ span >
24
+ </ div >
25
+ ) )
Original file line number Diff line number Diff line change
1
+ import React from 'react'
2
+ import { storiesOf } from '@storybook/react'
3
+ import SideBarDecorator from './utils/SideBarDecorator'
4
+
5
+ import Processes from '../src/components/Processes'
6
+
7
+ const styles = {
8
+ container : {
9
+ display : 'flex' as 'flex' ,
10
+ flexDirection : 'column' as 'column' ,
11
+ } ,
12
+ }
13
+
14
+ storiesOf ( 'Components' , module )
15
+ . addDecorator ( SideBarDecorator )
16
+ . add ( 'Processes' , ( ) => (
17
+ < Processes
18
+ processes = { [
19
+ {
20
+ title : 'npm install' ,
21
+ description : 'CLI Setup running' ,
22
+ } ,
23
+ {
24
+ title : 'npm test' ,
25
+ description : 'Test running' ,
26
+ } ,
27
+ ] }
28
+ />
29
+ ) )
You can’t perform that action at this time.
0 commit comments