-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9198 from Expensify/Rory-CleanupInlineSystemMessage
Add story for InlineSystemMessage
- Loading branch information
Showing
2 changed files
with
29 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
import InlineSystemMessage from '../components/InlineSystemMessage'; | ||
|
||
/** | ||
* We use the Component Story Format for writing stories. Follow the docs here: | ||
* | ||
* https://storybook.js.org/docs/react/writing-stories/introduction#component-story-format | ||
*/ | ||
const story = { | ||
title: 'Components/InlineSystemMessage', | ||
component: InlineSystemMessage, | ||
}; | ||
|
||
// eslint-disable-next-line react/jsx-props-no-spreading | ||
const Template = args => <InlineSystemMessage {...args} />; | ||
|
||
// Arguments can be passed to the component by binding | ||
// See: https://storybook.js.org/docs/react/writing-stories/introduction#using-args | ||
const Default = Template.bind({}); | ||
Default.args = { | ||
message: 'This is an error message', | ||
}; | ||
|
||
export default story; | ||
export { | ||
Default, | ||
}; |