generated from xgeekshq/oss-template
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: alert box primitive story (#1113)
- Loading branch information
1 parent
20286ff
commit 8c678b1
Showing
5 changed files
with
54 additions
and
5 deletions.
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
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
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
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
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,50 @@ | ||
import React from 'react'; | ||
import { ComponentStory } from '@storybook/react'; | ||
|
||
import dedent from 'ts-dedent'; | ||
|
||
import AlertBox from '@/components/Primitives/AlertBox'; | ||
|
||
export default { | ||
title: 'Primitives/AlertBox', | ||
component: AlertBox, | ||
parameters: { | ||
docs: { | ||
description: { | ||
component: dedent` | ||
An alert box that is displayed on the screen to inform or warn the user of something. | ||
**File Path:** | ||
\`@/components/Primitives/AlertBox/index.tsx\` and \`@/components/Primitives/AlertBox/styles.tsx\` | ||
`, | ||
}, | ||
}, | ||
}, | ||
args: { | ||
type: 'info', | ||
}, | ||
argTypes: { | ||
title: { | ||
control: false, | ||
description: 'Content of the title of the alert box.', | ||
}, | ||
text: { | ||
control: false, | ||
description: 'Content of the body of the alert box.', | ||
}, | ||
type: { | ||
description: 'Type of the component.', | ||
}, | ||
}, | ||
}; | ||
|
||
const Template: ComponentStory<typeof AlertBox> = ({ type }) => ( | ||
<AlertBox | ||
title="Lorem ipsum dolor sit amet, consectetur adipiscing elit." | ||
text="Aut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat." | ||
type={type} | ||
/> | ||
); | ||
|
||
export const Default = Template.bind({}); | ||
Default.storyName = 'Basic Usage'; |