2021-03-31 11:46:43 -04:00
|
|
|
import importOverleafModules from '../macros/import-overleaf-module.macro'
|
2022-05-16 05:38:20 -04:00
|
|
|
import { ScopeDecorator } from './decorators/scope'
|
2021-03-31 11:46:43 -04:00
|
|
|
|
|
|
|
const [
|
|
|
|
{
|
2021-04-27 03:52:58 -04:00
|
|
|
import: { default: GitBridgeModal },
|
|
|
|
},
|
2021-03-31 11:46:43 -04:00
|
|
|
] = importOverleafModules('gitBridge')
|
|
|
|
|
|
|
|
export const GitBridgeUrlModal = args => <GitBridgeModal {...args} />
|
|
|
|
GitBridgeUrlModal.args = {
|
2021-04-27 03:52:58 -04:00
|
|
|
type: 'show_url',
|
2021-03-31 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export const CollaboratorModal = args => <GitBridgeModal {...args} />
|
|
|
|
CollaboratorModal.args = {
|
2021-04-27 03:52:58 -04:00
|
|
|
type: 'collaborator',
|
2021-03-31 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
2021-05-11 10:25:22 -04:00
|
|
|
export const TeaserModal = args => {
|
2022-05-16 05:38:20 -04:00
|
|
|
// TODO: mock navigator.sendBeacon?
|
|
|
|
// useFetchMock(fetchMock => {
|
|
|
|
// fetchMock.post('express:/event/:key', 202)
|
|
|
|
// })
|
2021-05-11 10:25:22 -04:00
|
|
|
|
|
|
|
return <GitBridgeModal {...args} />
|
|
|
|
}
|
2021-03-31 11:46:43 -04:00
|
|
|
TeaserModal.args = {
|
2021-04-27 03:52:58 -04:00
|
|
|
type: 'teaser',
|
2021-03-31 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2022-03-28 06:23:21 -04:00
|
|
|
title: 'Editor / Modals / Git Bridge',
|
2021-03-31 11:46:43 -04:00
|
|
|
component: GitBridgeModal,
|
|
|
|
args: {
|
2021-04-27 03:52:58 -04:00
|
|
|
show: true,
|
2021-03-31 11:46:43 -04:00
|
|
|
},
|
|
|
|
argTypes: {
|
|
|
|
handleHide: { action: 'handleHide' },
|
|
|
|
},
|
2022-05-16 05:38:20 -04:00
|
|
|
decorators: [ScopeDecorator],
|
2021-03-31 11:46:43 -04:00
|
|
|
}
|