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
Next Next commit
add test fail component
Signed-off-by: shmck <shawn.j.mckay@gmail.com>
  • Loading branch information
ShMcK committed May 3, 2020
commit d7f69496842464ebca36fee1e2dcbd8641d153b0
21 changes: 21 additions & 0 deletions web-app/src/components/TestFail/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import * as React from 'react'
import { Message } from '@alifd/next'

interface Props {
title: string
description: string
}

const styles = {
fail: {
margin: '1rem',
},
}

const TestFail = (props: Props) => (
<Message css={styles.fail} key="fail" title={props.title} type="error" size="large" closeable>
<p>{props.description}</p>
</Message>
)

export default TestFail
1 change: 0 additions & 1 deletion web-app/stories/Checkbox.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { storiesOf } from '@storybook/react'
import React from 'react'
import { css, jsx } from '@emotion/core'
import Checkbox from '../src/components/Checkbox'
import SideBarDecorator from './utils/SideBarDecorator'

10 changes: 10 additions & 0 deletions web-app/stories/TestRunner.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { withKnobs } from '@storybook/addon-knobs'
import { storiesOf } from '@storybook/react'
import React from 'react'
import SideBarDecorator from './utils/SideBarDecorator'
import TestFail from '../src/components/TestFail'

storiesOf('Test', module)
.addDecorator(SideBarDecorator)
.addDecorator(withKnobs)
.add('Fail', () => <TestFail title="Error Title" description="Description of the error" />)