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