mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-30 12:32:32 -05:00
4a8b79080b
* [storybook] Update Storybook to version 8.3.5 * [storybook] Run storybook with `--no-open`. Fixes xdg-utils issue * [storybook] Create decorator for BS3/BS5 * [storybook] Add `bsVersionDecorator` to stories * [storybook] Fix bugs in stories * [storybook] Fixup `useMeta` type. Use `DeepPartial` * [storybook] Fix types GitOrigin-RevId: 48c0f0fefb1ab2d4863ab59051b900b1908a613c
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header'
|
|
import { ScopeDecorator } from './decorators/scope'
|
|
import { bsVersionDecorator } from '../../.storybook/utils/with-bootstrap-switcher'
|
|
|
|
export const UpToThreeConnectedUsers = args => {
|
|
return <ToolbarHeader {...args} />
|
|
}
|
|
UpToThreeConnectedUsers.args = {
|
|
onlineUsers: ['a', 'c', 'd'].map(c => ({
|
|
user_id: c,
|
|
name: `${c}_user name`,
|
|
})),
|
|
}
|
|
|
|
export const ManyConnectedUsers = args => {
|
|
return <ToolbarHeader {...args} />
|
|
}
|
|
ManyConnectedUsers.args = {
|
|
onlineUsers: ['a', 'c', 'd', 'e', 'f'].map(c => ({
|
|
user_id: c,
|
|
name: `${c}_user name`,
|
|
})),
|
|
}
|
|
|
|
export default {
|
|
title: 'Editor / Toolbar',
|
|
component: ToolbarHeader,
|
|
argTypes: {
|
|
goToUser: { action: 'goToUser' },
|
|
renameProject: { action: 'renameProject' },
|
|
toggleHistoryOpen: { action: 'toggleHistoryOpen' },
|
|
toggleReviewPanelOpen: { action: 'toggleReviewPanelOpen' },
|
|
toggleChatOpen: { action: 'toggleChatOpen' },
|
|
openShareModal: { action: 'openShareModal' },
|
|
onShowLeftMenuClick: { action: 'onShowLeftMenuClick' },
|
|
...bsVersionDecorator.argTypes,
|
|
},
|
|
args: {
|
|
projectName: 'Overleaf Project',
|
|
onlineUsers: [{ user_id: 'abc', name: 'overleaf' }],
|
|
unreadMessageCount: 0,
|
|
},
|
|
decorators: [ScopeDecorator],
|
|
}
|