Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6757380

Browse files
committed
Storybook error summary
1 parent 96d3a72 commit 6757380

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import { ComponentMeta, Story } from "@storybook/react"
2+
import React from "react"
3+
import { ErrorSummary, ErrorSummaryProps } from "."
4+
5+
export default {
6+
title: "components/ErrorSummary",
7+
component: ErrorSummary,
8+
} as ComponentMeta<typeof ErrorSummary>
9+
10+
const Template: Story<ErrorSummaryProps> = (args) => <ErrorSummary {...args} />
11+
12+
export const WithError = Template.bind({})
13+
WithError.args = {
14+
error: new Error("Something went wrong!")
15+
}
16+
17+
export const WithUndefined = Template.bind({})

0 commit comments

Comments
 (0)