@@ -13,7 +13,7 @@ import {
13
13
styled ,
14
14
} from '@mui/material' ;
15
15
16
- import { useEffect } from 'react' ;
16
+ import { ReactNode , useEffect } from 'react' ;
17
17
18
18
import { Context } from '@graasp/sdk' ;
19
19
@@ -77,24 +77,24 @@ type Props = {
77
77
/**
78
78
* Content to display inside the drawer / sidebar
79
79
*/
80
- drawerContent : JSX . Element ;
80
+ drawerContent : ReactNode ;
81
81
/**
82
82
* Content to display inside the footer
83
83
*/
84
- footerContent ?: JSX . Element ;
84
+ footerContent ?: ReactNode ;
85
85
/**
86
86
* Content to display inside the main area.
87
87
* This is usually the page content
88
88
*/
89
- children : JSX . Element | JSX . Element [ ] ;
89
+ children : ReactNode ;
90
90
/**
91
91
* Left content presented in the header
92
92
*/
93
- headerLeftContent ?: JSX . Element ;
93
+ headerLeftContent ?: ReactNode ;
94
94
/**
95
95
* Right content presented in the header
96
96
*/
97
- headerRightContent ?: JSX . Element ;
97
+ headerRightContent ?: ReactNode ;
98
98
/**
99
99
* Override the state of the drawer
100
100
* defaults to `false`
@@ -103,7 +103,7 @@ type Props = {
103
103
/**
104
104
* Wrapper component that supplies a link facility wrapping the logo
105
105
*/
106
- LinkComponent ?: ( props : { children : JSX . Element } ) => JSX . Element ;
106
+ LinkComponent ?: ( props : { children : ReactNode } ) => JSX . Element ;
107
107
/**
108
108
* Component that should be rendered to show the platform switch
109
109
*/
@@ -187,6 +187,9 @@ const MainWithDrawerContent = ({
187
187
aria-label = { drawerOpenAriaLabel }
188
188
onClick = { handleDrawerToggle }
189
189
edge = 'start'
190
+ data-umami-event = 'header-drawer-toggle'
191
+ data-umami-event-context = { context }
192
+ data-umami-event-open = { open }
190
193
>
191
194
{ open ? < MenuOpen /> : < MenuIcon /> }
192
195
</ IconButton >
0 commit comments