File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ import * as React from 'react'
2+ import { Message } from '@alifd/next'
3+
4+ interface Props {
5+ title : string
6+ description : string
7+ }
8+
9+ const styles = {
10+ fail : {
11+ margin : '1rem' ,
12+ } ,
13+ }
14+
15+ const TestFail = ( props : Props ) => (
16+ < Message css = { styles . fail } key = "fail" title = { props . title } type = "error" size = "large" closeable >
17+ < p > { props . description } </ p >
18+ </ Message >
19+ )
20+
21+ export default TestFail
Original file line number Diff line number Diff line change 11import { storiesOf } from '@storybook/react'
22import React from 'react'
3- import { css , jsx } from '@emotion/core'
43import Checkbox from '../src/components/Checkbox'
54import SideBarDecorator from './utils/SideBarDecorator'
65
Original file line number Diff line number Diff line change 1+ import { withKnobs } from '@storybook/addon-knobs'
2+ import { storiesOf } from '@storybook/react'
3+ import React from 'react'
4+ import SideBarDecorator from './utils/SideBarDecorator'
5+ import TestFail from '../src/components/TestFail'
6+
7+ storiesOf ( 'Test' , module )
8+ . addDecorator ( SideBarDecorator )
9+ . addDecorator ( withKnobs )
10+ . add ( 'Fail' , ( ) => < TestFail title = "Error Title" description = "Description of the error" /> )
You can’t perform that action at this time.
0 commit comments