Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add stories file for API request component
- Loading branch information
1 parent
0321765
commit d167de7
Showing
3 changed files
with
58 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
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,56 @@ | ||
import React from 'react'; | ||
import Component from './index'; | ||
import Layout from '@theme/Layout'; | ||
import { BrowserRouter } from 'react-router-dom'; | ||
|
||
export default { | ||
title: 'API request component', | ||
component: Component, | ||
}; | ||
|
||
const Template = (args) => ( | ||
<BrowserRouter> | ||
<Layout> | ||
<Component {...args} /> | ||
</Layout> | ||
</BrowserRouter> | ||
); | ||
|
||
export const Step1 = Template.bind({}); | ||
Step1.args = { | ||
open: true, | ||
seedData: { | ||
currentStep: 1, | ||
}, | ||
}; | ||
|
||
export const Step2 = Template.bind({}); | ||
Step2.args = { | ||
seedData: { | ||
currentStep: 2, | ||
}, | ||
open: true, | ||
}; | ||
|
||
export const Step3 = Template.bind({}); | ||
Step3.args = { | ||
seedData: { | ||
currentStep: 3, | ||
}, | ||
open: true, | ||
}; | ||
|
||
export const Step4 = Template.bind({}); | ||
Step4.args = { | ||
seedData: { | ||
currentStep: 4, | ||
}, | ||
open: true, | ||
}; | ||
|
||
export const WithLocalStorage = Template.bind({}); | ||
WithLocalStorage.args = { | ||
open: true, | ||
}; | ||
|
||
export const Closed = Template.bind({}); |
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