4e57f6b342
* draft for tablet view * adapt sidebar to tablet view * split menubar to handle tablet and desktop separatly * split sidebar to handle tablet and desktop separatly * prettier day navigationin tablet view * added missing translations * coderabbit comments * fix UI of view switcher on tablet, remove hard text * fix style of selected view option * fix wrong I18n key * extracted menubar recurring components to own files * adjust test case of calendar component * refactor function change calendar view Co-authored-by: Camille Moussu <cmoussu@linagora.com> Co-authored-by: lethemanh <lethemanh@lethemanhs-MacBook-Pro.local>
38 lines
906 B
TypeScript
38 lines
906 B
TypeScript
import { Box } from '@linagora/twake-mui'
|
|
import CalendarSelection from '../CalendarSelection'
|
|
import { TempCalendarsInput } from '../TempCalendarsInput'
|
|
import { CalendarSidebarProps } from './SideBar'
|
|
|
|
export function SidebarCommonContent({
|
|
onCreateEvent,
|
|
tempUsers,
|
|
setTempUsers,
|
|
selectedCalendars,
|
|
setSelectedCalendars
|
|
}: Pick<
|
|
CalendarSidebarProps,
|
|
| 'onCreateEvent'
|
|
| 'tempUsers'
|
|
| 'setTempUsers'
|
|
| 'selectedCalendars'
|
|
| 'setSelectedCalendars'
|
|
>) {
|
|
return (
|
|
<>
|
|
<Box sx={{ mb: 3, mt: 2 }}>
|
|
<TempCalendarsInput
|
|
tempUsers={tempUsers}
|
|
setTempUsers={setTempUsers}
|
|
handleToggleEventPreview={onCreateEvent}
|
|
/>
|
|
</Box>
|
|
<Box className="calendarList">
|
|
<CalendarSelection
|
|
selectedCalendars={selectedCalendars}
|
|
setSelectedCalendars={setSelectedCalendars}
|
|
/>
|
|
</Box>
|
|
</>
|
|
)
|
|
}
|