diff --git a/docs/package.json b/docs/package.json index 1a8a941c9aeb..6a075e576645 100644 --- a/docs/package.json +++ b/docs/package.json @@ -73,7 +73,6 @@ "stylis": "^4.0.10", "stylis-plugin-rtl": "^2.1.0", "stylis-plugin-rtl-sc": "npm:stylis-plugin-rtl@^2.1.0", - "webfontloader": "^1.6.28", "webpack-bundle-analyzer": "^4.5.0" }, "devDependencies": { diff --git a/packages/grid/_modules_/grid/hooks/features/export/useGridPrintExport.tsx b/packages/grid/_modules_/grid/hooks/features/export/useGridPrintExport.tsx index 2792c8715e95..f27b5cfe8be7 100644 --- a/packages/grid/_modules_/grid/hooks/features/export/useGridPrintExport.tsx +++ b/packages/grid/_modules_/grid/hooks/features/export/useGridPrintExport.tsx @@ -156,7 +156,8 @@ export const useGridPrintExport = ( typeof normalizeOptions.pageStyle === 'function' ? normalizeOptions.pageStyle() : normalizeOptions.pageStyle; - if (typeof defaultPageStyle !== 'string') { + if (typeof defaultPageStyle === 'string') { + // TODO custom styles should always win const styleElement = printDoc.createElement('style'); styleElement.appendChild(printDoc.createTextNode(defaultPageStyle)); printDoc.head.appendChild(styleElement); diff --git a/packages/storybook/src/stories/grid-toolbar.stories.tsx b/packages/storybook/src/stories/grid-toolbar.stories.tsx index 61abc206e0fd..84c5b0c56fad 100644 --- a/packages/storybook/src/stories/grid-toolbar.stories.tsx +++ b/packages/storybook/src/stories/grid-toolbar.stories.tsx @@ -1,7 +1,13 @@ import { DataGrid } from '@mui/x-data-grid'; import { useDemoData } from '@mui/x-data-grid-generator'; import * as React from 'react'; -import { DataGridPro, GridToolbar } from '@mui/x-data-grid-pro'; +import { + DataGridPro, + GridToolbar, + GridToolbarContainer, + GridToolbarExport, + gridClasses, +} from '@mui/x-data-grid-pro'; import '../style/grid-stories.css'; import { useData } from '../hooks/useData'; @@ -70,6 +76,19 @@ export const Export = () => { ); }; +function CustomToolbar() { + return ( + + + + ); +} + export const PrintExportSnap = () => { const { data } = useDemoData({ dataSet: 'Commodity', @@ -84,7 +103,7 @@ export const PrintExportSnap = () => { {...data} checkboxSelection components={{ - Toolbar: GridToolbar, + Toolbar: CustomToolbar, }} /> diff --git a/test/regressions/index.js b/test/regressions/index.js index 4a215ac0890b..5a3554fff1f2 100644 --- a/test/regressions/index.js +++ b/test/regressions/index.js @@ -3,7 +3,6 @@ import ReactDOM from 'react-dom'; import { BrowserRouter as Router, Switch, Route, Link } from 'react-router-dom'; import { LicenseInfo } from '@mui/x-data-grid-pro'; import { withStyles } from '@mui/styles'; -import webfontloader from 'webfontloader'; import TestViewer from 'test/regressions/TestViewer'; import { useFakeTimers } from 'sinon'; import addons, { mockChannel } from '@storybook/addons'; @@ -159,25 +158,6 @@ function App() { }; }, []); - // Using does not apply the google Roboto font in chromium headless/headfull. - const [fontState, setFontState] = React.useState('pending'); - React.useEffect(() => { - webfontloader.load({ - google: { - families: ['Roboto:300,400,500,700'], - }, - timeout: 20000, - active: () => { - setFontState('active'); - }, - inactive: () => { - setFontState('inactive'); - }, - }); - }, []); - - const testPrepared = fontState !== 'pending'; - function computePath(test) { return `/${test.suite}/${test.name}`; } @@ -201,17 +181,14 @@ function App() { return ( - {testPrepared && ( - - - - )} + + + ); })}