2021-03-31 11:46:43 -04:00
|
|
|
import React from 'react'
|
|
|
|
import { ContextRoot } from '../js/shared/context/root-context'
|
|
|
|
import { setupContext } from './fixtures/context'
|
|
|
|
import importOverleafModules from '../macros/import-overleaf-module.macro'
|
|
|
|
|
|
|
|
const [
|
|
|
|
{
|
2021-04-27 03:52:58 -04:00
|
|
|
import: { default: GitBridgeModal },
|
|
|
|
},
|
2021-03-31 11:46:43 -04:00
|
|
|
] = importOverleafModules('gitBridge')
|
|
|
|
|
|
|
|
setupContext()
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
export const TeaserModal = args => <GitBridgeModal {...args} />
|
|
|
|
TeaserModal.args = {
|
2021-04-27 03:52:58 -04:00
|
|
|
type: 'teaser',
|
2021-03-31 11:46:43 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Modals / Git Bridge Modal',
|
|
|
|
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' },
|
2021-04-27 03:52:58 -04:00
|
|
|
startFreeTrial: { action: 'startFreeTrial' },
|
2021-03-31 11:46:43 -04:00
|
|
|
},
|
|
|
|
decorators: [
|
|
|
|
Story => (
|
|
|
|
<>
|
|
|
|
<ContextRoot ide={window._ide} settings={{}}>
|
|
|
|
<Story />
|
|
|
|
</ContextRoot>
|
|
|
|
</>
|
2021-04-27 03:52:58 -04:00
|
|
|
),
|
|
|
|
],
|
2021-03-31 11:46:43 -04:00
|
|
|
}
|