2021-01-27 05:30:55 -05:00
|
|
|
import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header'
|
2022-08-18 04:14:44 -04:00
|
|
|
import { ScopeDecorator } from './decorators/scope'
|
2024-10-10 03:26:18 -04:00
|
|
|
import { bsVersionDecorator } from '../../.storybook/utils/with-bootstrap-switcher'
|
2021-01-27 05:30:55 -05:00
|
|
|
|
2021-02-10 05:57:25 -05:00
|
|
|
export const UpToThreeConnectedUsers = args => {
|
|
|
|
return <ToolbarHeader {...args} />
|
|
|
|
}
|
|
|
|
UpToThreeConnectedUsers.args = {
|
|
|
|
onlineUsers: ['a', 'c', 'd'].map(c => ({
|
|
|
|
user_id: c,
|
2021-04-27 03:52:58 -04:00
|
|
|
name: `${c}_user name`,
|
|
|
|
})),
|
2021-02-10 05:57:25 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export const ManyConnectedUsers = args => {
|
|
|
|
return <ToolbarHeader {...args} />
|
|
|
|
}
|
|
|
|
ManyConnectedUsers.args = {
|
|
|
|
onlineUsers: ['a', 'c', 'd', 'e', 'f'].map(c => ({
|
|
|
|
user_id: c,
|
2021-04-27 03:52:58 -04:00
|
|
|
name: `${c}_user name`,
|
|
|
|
})),
|
2021-01-27 05:30:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2022-03-28 06:23:21 -04:00
|
|
|
title: 'Editor / Toolbar',
|
2021-02-10 05:57:25 -05:00
|
|
|
component: ToolbarHeader,
|
|
|
|
argTypes: {
|
2021-03-10 07:19:54 -05:00
|
|
|
goToUser: { action: 'goToUser' },
|
|
|
|
renameProject: { action: 'renameProject' },
|
|
|
|
toggleHistoryOpen: { action: 'toggleHistoryOpen' },
|
|
|
|
toggleReviewPanelOpen: { action: 'toggleReviewPanelOpen' },
|
|
|
|
toggleChatOpen: { action: 'toggleChatOpen' },
|
|
|
|
openShareModal: { action: 'openShareModal' },
|
2021-04-27 03:52:58 -04:00
|
|
|
onShowLeftMenuClick: { action: 'onShowLeftMenuClick' },
|
2024-10-10 03:26:18 -04:00
|
|
|
...bsVersionDecorator.argTypes,
|
2021-02-10 05:57:25 -05:00
|
|
|
},
|
|
|
|
args: {
|
2021-03-10 07:19:54 -05:00
|
|
|
projectName: 'Overleaf Project',
|
2021-02-10 05:57:25 -05:00
|
|
|
onlineUsers: [{ user_id: 'abc', name: 'overleaf' }],
|
2021-04-27 03:52:58 -04:00
|
|
|
unreadMessageCount: 0,
|
|
|
|
},
|
2022-08-18 04:14:44 -04:00
|
|
|
decorators: [ScopeDecorator],
|
2021-01-27 05:30:55 -05:00
|
|
|
}
|