Skip to content

Commit 0428ee5

Browse files
author
Alexis
committed
docs(ErrorModal): add stories
1 parent c9b0c4d commit 0428ee5

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
import React from 'react';
2+
3+
import ErrorModal from './ErrorModal';
4+
5+
export default {
6+
title: 'IDE/ErrorModal',
7+
component: ErrorModal,
8+
argTypes: {
9+
type: {
10+
options: [
11+
'forceAuthentication',
12+
'staleSession',
13+
'staleProject',
14+
'oauthError'
15+
],
16+
control: { type: 'select' }
17+
},
18+
service: {
19+
options: ['google', 'github'],
20+
control: { type: 'select' }
21+
},
22+
closeModal: { action: 'closed' }
23+
}
24+
};
25+
26+
const Template = (args) => <ErrorModal {...args} />;
27+
28+
export const ForceAuthenticationErrorModal = Template.bind({});
29+
ForceAuthenticationErrorModal.args = {
30+
type: 'forceAuthentication'
31+
};
32+
33+
export const StaleSessionErrorModal = Template.bind({});
34+
StaleSessionErrorModal.args = {
35+
type: 'staleSession'
36+
};
37+
38+
export const StaleProjectErrorModal = Template.bind({});
39+
StaleProjectErrorModal.args = {
40+
type: 'staleProject'
41+
};
42+
43+
export const OauthErrorModal = Template.bind({});
44+
OauthErrorModal.args = {
45+
type: 'oauthError',
46+
service: 'google'
47+
};

0 commit comments

Comments
 (0)