2021-01-27 10:30:55 +00:00
|
|
|
import React from 'react'
|
|
|
|
import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header'
|
|
|
|
|
2021-02-17 10:05:33 +00:00
|
|
|
import { setupContext } from './fixtures/context'
|
|
|
|
|
|
|
|
setupContext()
|
2021-02-10 10:57:25 +00:00
|
|
|
|
|
|
|
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`
|
|
|
|
}))
|
2021-01-27 10:30:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2021-02-10 10:57:25 +00:00
|
|
|
title: 'EditorNavigationToolbar',
|
|
|
|
component: ToolbarHeader,
|
|
|
|
argTypes: {
|
2021-03-10 12:19:54 +00:00
|
|
|
goToUser: { action: 'goToUser' },
|
|
|
|
renameProject: { action: 'renameProject' },
|
|
|
|
toggleHistoryOpen: { action: 'toggleHistoryOpen' },
|
|
|
|
toggleReviewPanelOpen: { action: 'toggleReviewPanelOpen' },
|
|
|
|
toggleChatOpen: { action: 'toggleChatOpen' },
|
|
|
|
togglePdfView: { action: 'togglePdfView' },
|
|
|
|
openShareModal: { action: 'openShareModal' },
|
|
|
|
onShowLeftMenuClick: { action: 'onShowLeftMenuClick' }
|
2021-02-10 10:57:25 +00:00
|
|
|
},
|
|
|
|
args: {
|
2021-03-10 12:19:54 +00:00
|
|
|
projectName: 'Overleaf Project',
|
2021-02-10 10:57:25 +00:00
|
|
|
onlineUsers: [{ user_id: 'abc', name: 'overleaf' }],
|
2021-03-10 12:19:54 +00:00
|
|
|
unreadMessageCount: 0
|
2021-02-10 10:57:25 +00:00
|
|
|
}
|
2021-01-27 10:30:55 +00:00
|
|
|
}
|