mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
9563373466
GitOrigin-RevId: 50024c6a8c6ce3fc64262f813bb31f3639746aae
37 lines
1 KiB
TypeScript
37 lines
1 KiB
TypeScript
import SSODisableModal, {
|
|
type SSODisableModalProps,
|
|
} from '../../../../modules/managed-users/frontend/js/components/modals/sso-disable-modal'
|
|
import useFetchMock from '../../hooks/use-fetch-mock'
|
|
import { useMeta } from '../../hooks/use-meta'
|
|
|
|
export const DisableSSOModalDefault = (args: SSODisableModalProps) => {
|
|
useMeta({ 'ol-groupId': '123' })
|
|
useFetchMock(fetchMock => {
|
|
fetchMock.post('express:/manage/groups/:id/settings/disableSSO', 200, {
|
|
delay: 500,
|
|
})
|
|
})
|
|
return <SSODisableModal {...args} />
|
|
}
|
|
|
|
export const DisableSSOModalError = (args: SSODisableModalProps) => {
|
|
useMeta({ 'ol-groupId': '123' })
|
|
useFetchMock(fetchMock => {
|
|
fetchMock.post('express:/manage/groups/:id/settings/enableSSO', 500, {
|
|
delay: 500,
|
|
})
|
|
})
|
|
return <SSODisableModal {...args} />
|
|
}
|
|
|
|
export default {
|
|
title: 'Subscription / SSO / Disable Modal',
|
|
component: SSODisableModal,
|
|
args: {
|
|
show: true,
|
|
},
|
|
argTypes: {
|
|
handleHide: { action: 'close modal' },
|
|
onDisableSSO: { action: 'callback' },
|
|
},
|
|
}
|