Summary
Could ToolbarRoot (or its styles) from https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/components/toolbarV8/Toolbar.tsx be exported to enable reusing its styles elsewhere? As this file currently appears, it doesn't appear possible to access ToolbarRoot from outside, since only Toolbar is exported.
Examples
|
const ToolbarRoot = styled('div', { |
|
name: 'MuiDataGrid', |
|
slot: 'Toolbar', |
|
})({ |
|
flex: '0 1 1px', |
|
display: 'flex', |
|
alignItems: 'center', |
|
justifyContent: 'end', |
|
gap: vars.spacing(0.25), |
|
padding: vars.spacing(0.75), |
|
minHeight: 52, |
|
boxSizing: 'border-box', |
|
borderBottom: `1px solid ${vars.colors.border.base}`, |
|
}); |
Motivation
I'm displaying a Drawer alongside the DataGrid and wanted the drawer's header to appear identically to the Toolbar, without needing to copy-paste and keep the styles in sync between implementations.
Search keywords: ToolbarRoot
Summary
Could
ToolbarRoot(or its styles) from https://github.com/mui/mui-x/blob/master/packages/x-data-grid/src/components/toolbarV8/Toolbar.tsx be exported to enable reusing its styles elsewhere? As this file currently appears, it doesn't appear possible to accessToolbarRootfrom outside, since onlyToolbaris exported.Examples
mui-x/packages/x-data-grid/src/components/toolbarV8/Toolbar.tsx
Lines 35 to 48 in cad99f0
Motivation
I'm displaying a
Draweralongside theDataGridand wanted the drawer's header to appear identically to theToolbar, without needing to copy-paste and keep the styles in sync between implementations.Search keywords: ToolbarRoot