Skip to content

Commit f9c4800

Browse files
author
Alexis
committed
docs(ErrorModal): remove redundant config
1 parent 754c841 commit f9c4800

File tree

1 file changed

+16
-33
lines changed

1 file changed

+16
-33
lines changed
Lines changed: 16 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,30 @@
1-
import React from 'react';
2-
31
import ErrorModal from './ErrorModal';
42

53
export default {
64
title: 'IDE/ErrorModal',
75
component: ErrorModal,
86
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-
},
227
closeModal: { action: 'closed' }
238
}
249
};
2510

26-
const Template = (args) => <ErrorModal {...args} />;
27-
28-
export const ForceAuthenticationErrorModal = Template.bind({});
29-
ForceAuthenticationErrorModal.args = {
30-
type: 'forceAuthentication'
11+
export const ForceAuthenticationErrorModal = {
12+
args: {
13+
type: 'forceAuthentication'
14+
}
3115
};
32-
33-
export const StaleSessionErrorModal = Template.bind({});
34-
StaleSessionErrorModal.args = {
35-
type: 'staleSession'
16+
export const StaleSessionErrorModal = {
17+
args: {
18+
type: 'staleSession'
19+
}
3620
};
37-
38-
export const StaleProjectErrorModal = Template.bind({});
39-
StaleProjectErrorModal.args = {
40-
type: 'staleProject'
21+
export const StaleProjectErrorModal = {
22+
args: {
23+
type: 'staleProject'
24+
}
4125
};
42-
43-
export const OauthErrorModal = Template.bind({});
44-
OauthErrorModal.args = {
45-
type: 'oauthError',
46-
service: 'google'
26+
export const OauthErrorModal = {
27+
args: {
28+
type: 'oauthError'
29+
}
4730
};

0 commit comments

Comments
 (0)