2021-01-27 05:30:55 -05:00
|
|
|
import React from 'react'
|
|
|
|
import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header'
|
|
|
|
|
2021-02-17 05:05:33 -05:00
|
|
|
import { setupContext } from './fixtures/context'
|
|
|
|
|
|
|
|
setupContext()
|
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,
|
|
|
|
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 05:30:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
2021-02-10 05:57:25 -05:00
|
|
|
title: 'EditorNavigationToolbar',
|
|
|
|
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' },
|
|
|
|
togglePdfView: { action: 'togglePdfView' },
|
|
|
|
openShareModal: { action: 'openShareModal' },
|
|
|
|
onShowLeftMenuClick: { action: 'onShowLeftMenuClick' }
|
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-03-10 07:19:54 -05:00
|
|
|
unreadMessageCount: 0
|
2021-02-10 05:57:25 -05:00
|
|
|
}
|
2021-01-27 05:30:55 -05:00
|
|
|
}
|