Skip to content

Commit af97ec2

Browse files
committed
replace oauth sso dialog modal
1 parent 455af3b commit af97ec2

File tree

1 file changed

+19
-16
lines changed

1 file changed

+19
-16
lines changed

redisinsight/ui/src/components/oauth/oauth-sso-dialog/OAuthSsoDialog.tsx

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React, { useCallback } from 'react'
2-
import { EuiModal, EuiModalBody } from '@elastic/eui'
32

43
import { useDispatch, useSelector } from 'react-redux'
54

@@ -13,6 +12,7 @@ import { cloudSelector } from 'uiSrc/slices/instances/cloud'
1312
import { OAuthCreateDb, OAuthSignIn } from 'uiSrc/components/oauth/oauth-sso'
1413

1514
import { sendEventTelemetry, TelemetryEvent } from 'uiSrc/telemetry'
15+
import { Modal } from 'uiSrc/components/base/display'
1616
import styles from './styles.module.scss'
1717

1818
const OAuthSsoDialog = () => {
@@ -36,27 +36,30 @@ const OAuthSsoDialog = () => {
3636
}
3737

3838
return (
39-
<EuiModal
40-
onClose={handleClose}
39+
<Modal
40+
open
41+
onCancel={handleClose}
4142
className={cx(styles.modal, {
4243
[styles.createDb]: ssoFlow === OAuthSocialAction.Create,
4344
[styles.signIn]: ssoFlow === OAuthSocialAction.SignIn,
4445
[styles.import]: ssoFlow === OAuthSocialAction.Import,
4546
})}
4647
data-testid="social-oauth-dialog"
47-
>
48-
<EuiModalBody>
49-
{ssoFlow === OAuthSocialAction.Create && (
50-
<OAuthCreateDb source={source} />
51-
)}
52-
{ssoFlow === OAuthSocialAction.SignIn && (
53-
<OAuthSignIn source={source} />
54-
)}
55-
{ssoFlow === OAuthSocialAction.Import && (
56-
<OAuthSignIn action={OAuthSocialAction.Import} source={source} />
57-
)}
58-
</EuiModalBody>
59-
</EuiModal>
48+
title=""
49+
content={
50+
<>
51+
{ssoFlow === OAuthSocialAction.Create && (
52+
<OAuthCreateDb source={source} />
53+
)}
54+
{ssoFlow === OAuthSocialAction.SignIn && (
55+
<OAuthSignIn source={source} />
56+
)}
57+
{ssoFlow === OAuthSocialAction.Import && (
58+
<OAuthSignIn action={OAuthSocialAction.Import} source={source} />
59+
)}
60+
</>
61+
}
62+
/>
6063
)
6164
}
6265

0 commit comments

Comments
 (0)