overleaf/services/web/frontend/stories/editor-left-menu/help-menu.stories.tsx
M Fahru 867451fa5f Add unit tests and storybook components for help menu
GitOrigin-RevId: d6f17a97d559d698461c77af3273d7d9255cdcc8
2022-11-03 09:03:56 +00:00

33 lines
759 B
TypeScript

import HelpMenu from '../../js/features/editor-left-menu/components/help-menu'
import { ScopeDecorator } from '../decorators/scope'
export default {
title: 'Editor / Left Menu / Help Menu',
component: HelpMenu,
decorators: [ScopeDecorator],
}
export const ShowSupport = () => {
window.metaAttributesCache.set('ol-showSupport', true)
window.metaAttributesCache.set('ol-user', {
email: 'sherlock@holmes.co.uk',
first_name: 'Sherlock',
last_name: 'Holmes',
})
return (
<div id="left-menu" className="shown">
<HelpMenu />
</div>
)
}
export const HideSupport = () => {
window.metaAttributesCache.set('ol-showSupport', false)
return (
<div id="left-menu" className="shown">
<HelpMenu />
</div>
)
}