forked from airbytehq/airbyte
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
airbyte-webapp/src/components/SingletonCard/index.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { ComponentStory, ComponentMeta } from "@storybook/react"; | ||
|
||
import { SingletonCard } from "./SingletonCard"; | ||
|
||
export default { | ||
title: "Ui/SingletonCard", | ||
component: SingletonCard, | ||
argTypes: { | ||
title: { type: { name: "string", required: false } }, | ||
text: { type: { name: "string", required: false } }, | ||
onClose: { table: { disable: true } }, | ||
}, | ||
} as ComponentMeta<typeof SingletonCard>; | ||
|
||
const Template: ComponentStory<typeof SingletonCard> = (args) => <SingletonCard {...args} />; | ||
|
||
export const Basic = Template.bind({}); | ||
Basic.args = { | ||
text: "This is a basic card", | ||
}; | ||
|
||
export const WithTitle = Template.bind({}); | ||
WithTitle.args = { | ||
title: "With Title", | ||
text: "This is a card with a title", | ||
}; | ||
|
||
export const WithCloseButton = Template.bind({}); | ||
WithCloseButton.args = { | ||
title: "With Close button", | ||
text: "This is a card with a close button", | ||
onClose: () => { | ||
console.log("Closed!"); | ||
}, | ||
}; |