mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 02:05:22 -05:00
1173c5c2da
Move GitHub Sync Modal stories under Modals GitOrigin-RevId: 65f1f989550026f7e29846bc4f1685b13f5d0cfe
48 lines
1 KiB
JavaScript
48 lines
1 KiB
JavaScript
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 [
|
|
{
|
|
import: { default: GitBridgeModal },
|
|
},
|
|
] = importOverleafModules('gitBridge')
|
|
|
|
setupContext()
|
|
|
|
export const GitBridgeUrlModal = args => <GitBridgeModal {...args} />
|
|
GitBridgeUrlModal.args = {
|
|
type: 'show_url',
|
|
}
|
|
|
|
export const CollaboratorModal = args => <GitBridgeModal {...args} />
|
|
CollaboratorModal.args = {
|
|
type: 'collaborator',
|
|
}
|
|
|
|
export const TeaserModal = args => <GitBridgeModal {...args} />
|
|
TeaserModal.args = {
|
|
type: 'teaser',
|
|
}
|
|
|
|
export default {
|
|
title: 'Modals / Git Bridge',
|
|
component: GitBridgeModal,
|
|
args: {
|
|
show: true,
|
|
},
|
|
argTypes: {
|
|
handleHide: { action: 'handleHide' },
|
|
startFreeTrial: { action: 'startFreeTrial' },
|
|
},
|
|
decorators: [
|
|
Story => (
|
|
<>
|
|
<ContextRoot ide={window._ide} settings={{}}>
|
|
<Story />
|
|
</ContextRoot>
|
|
</>
|
|
),
|
|
],
|
|
}
|