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: {
|
|
|
|
goToUser: { action: 'goToUser' }
|
|
|
|
},
|
|
|
|
args: {
|
|
|
|
onlineUsers: [{ user_id: 'abc', name: 'overleaf' }],
|
|
|
|
goToUser: () => {},
|
|
|
|
onShowLeftMenuClick: () => {}
|
|
|
|
}
|
2021-01-27 10:30:55 +00:00
|
|
|
}
|