mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
d94eaa19cc
[web] Enable SSO switch on Group Settings GitOrigin-RevId: 591881eb4e6bad912de026f7a687f3b020712c2d
37 lines
1 KiB
TypeScript
37 lines
1 KiB
TypeScript
import SSOEnableModal, {
|
|
type SSOEnableModalProps,
|
|
} from '../../../../modules/managed-users/frontend/js/components/modals/sso-enable-modal'
|
|
import useFetchMock from '../../hooks/use-fetch-mock'
|
|
import { useMeta } from '../../hooks/use-meta'
|
|
|
|
export const EnableSSOModalDefault = (args: SSOEnableModalProps) => {
|
|
useMeta({ 'ol-groupId': '123' })
|
|
useFetchMock(fetchMock => {
|
|
fetchMock.post('express:/manage/groups/:id/settings/enableSSO', 200, {
|
|
delay: 500,
|
|
})
|
|
})
|
|
return <SSOEnableModal {...args} />
|
|
}
|
|
|
|
export const EnableSSOModalError = (args: SSOEnableModalProps) => {
|
|
useMeta({ 'ol-groupId': '123' })
|
|
useFetchMock(fetchMock => {
|
|
fetchMock.post('express:/manage/groups/:id/settings/enableSSO', 500, {
|
|
delay: 500,
|
|
})
|
|
})
|
|
return <SSOEnableModal {...args} />
|
|
}
|
|
|
|
export default {
|
|
title: 'Subscription / SSO / Enable Modal',
|
|
component: SSOEnableModal,
|
|
args: {
|
|
show: true,
|
|
},
|
|
argTypes: {
|
|
handleHide: { action: 'close modal' },
|
|
onEnableSSO: { action: 'callback' },
|
|
},
|
|
}
|