overleaf/services/web/frontend/stories/editor-left-menu/sync-menu.stories.tsx
M Fahru a2c232643f Add sync menu storybook components
GitOrigin-RevId: 8fb5979e88ba601ef1a95852550a62c295b43f76
2022-11-09 09:03:43 +00:00

35 lines
766 B
TypeScript

import SyncMenu from '../../js/features/editor-left-menu/components/sync-menu'
import { ScopeDecorator } from '../decorators/scope'
import { useScope } from '../hooks/use-scope'
export default {
title: 'Editor / Left Menu / Sync Menu',
component: SyncMenu,
decorators: [ScopeDecorator],
}
export const WriteAccess = () => {
window.metaAttributesCache.set('ol-anonymous', false)
useScope({
permissionsLevel: 'owner',
})
return (
<div id="left-menu" className="shown">
<SyncMenu />
</div>
)
}
export const ReadOnlyAccess = () => {
window.metaAttributesCache.set('ol-anonymous', false)
useScope({
permissionsLevel: 'readOnly',
})
return (
<div id="left-menu" className="shown">
<SyncMenu />
</div>
)
}