I am in the process of customizing a Data Grid Toolbar
component by making adjustments to the existing Grid Toolbar
components sourced from Material-UI.
For reference, you can view the official example of the Grid Toolbar
components here.
Upon clicking on any of the Grid Toolbar
components, a popup/popper is displayed, as shown in the screenshot below.
https://i.sstatic.net/Vby8u.png
My objective is to modify the font sizes of the text within each popup/popper associated with the Grid Toolbar
components.
After experimenting with altering the text, I noticed that directly changing the font-size
and color
properties while inspecting the text in the screenshot resulted in visible changes.
https://i.sstatic.net/rf3mx.png
However, upon attempting to replicate these changes by pasting the selector (e.g., .MuiTypography-body1
) in the code, the properties did not update as anticipated.
Here is a snippet of the code:
const CustomGridToolbarColumns = withStyles((theme) => ({
root: {
color: "dodgerblue",
"& .MuiTypography-body1": {
fontSize: 20,
color: "red"
}
}
}))(GridToolbarColumnsButton);
I am also looking to customize all font-size
and color
properties within each popup/popper associated with the Grid Toolbar
components.
Despite attempting to modify the font-size
and color
properties directly while inspecting the popup/popper, the changes were not applied, as shown in the screenshot below.
https://i.sstatic.net/1Wbr4.png
The dependencies in the package.json file include:
"@material-ui/core": "^4.12.3",
"@material-ui/styles": "^4.11.4",
"@mui/x-data-grid-pro": "^4.0.0",
You can access the complete code here.
Therefore, my inquiries are as follows:
- How can we modify specific properties within the popup/popper of each
Grid Toolbar
component? - How can we customize all properties within the popup/popper of each
Grid Toolbar
component?