overleaf/services/web/frontend/stories/editor-navigation-toolbar.stories.js
Jakob Ackermann da641ba039 Merge pull request #3649 from overleaf/as-chat-test-cleanup
Chat test cleanup

GitOrigin-RevId: 4323d93f64f0e51efd2931acbc77fc9b43a216cd
2021-02-18 03:04:51 +00:00

39 lines
889 B
JavaScript

import React from 'react'
import ToolbarHeader from '../js/features/editor-navigation-toolbar/components/toolbar-header'
import { setupContext } from './fixtures/context'
setupContext()
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: 'EditorNavigationToolbar',
component: ToolbarHeader,
argTypes: {
goToUser: { action: 'goToUser' }
},
args: {
onlineUsers: [{ user_id: 'abc', name: 'overleaf' }],
goToUser: () => {},
onShowLeftMenuClick: () => {}
}
}