Open kyle-seely opened 10 months ago
Hey @kyle-seely and thanks for raising this issue. It is indeed an interesting use case you have here, so I'll loop in @DanailH for this.
@DanailH do you know if this might be possible with custom module augmentation as with the lab in material-ui: https://mui.com/material-ui/about-the-lab/#typescript
mm I'm unsure but we can investigate what is possible.
Steps to reproduce
Link to live example: https://codesandbox.io/p/sandbox/zen-heyrovsky-fh6568
Steps:
Current behavior
TS2353: Object literal may only specify known properties, and 'variants' does not exist in type '{ defaultProps?: Partial<DataGridProProps> | undefined; styleOverrides?: Partial<OverridesStyleRules<keyof GridClasses, "MuiDataGrid", Omit<Theme, "components">>> | undefined; }'.
12 | density: "compact",
13 | },
Expected behavior
Variants should be added to the type definition to add custom datagrid variants.
Context
No response
Your environment
``` Don't forget to mention which browser you used. Output from `npx @mui/envinfo` goes here. ```npx @mui/envinfo
Search keywords: variants