-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[docs] Differentiate between packages in slotProps
docs
#9668
[docs] Differentiate between packages in slotProps
docs
#9668
Conversation
Netlify deploy previewNetlify deploy preview: https://deploy-preview-9668--material-ui-x.netlify.app/ Updated pagesThese are the results for the performance tests:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice. <codeblock />
is actually cool. 🧊
@alexfauquette Thanks for your work on codeblocks! 🎉 |
@@ -184,8 +184,10 @@ For example, for `columnMenu` slot, the interface name would be `ColumnMenuProps | |||
|
|||
This [file](https://github.com/mui/mui-x/blob/-/packages/grid/x-data-grid/src/models/gridSlotsComponentsProps.ts) lists all the interfaces for each slot which could be used for augmentation. | |||
|
|||
```tsx | |||
// augment the props for `toolbar` slot | |||
<codeblock storageKey="data-grid-pricing-plan"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hesitating to say that we don't need a storage key for this
<codeblock storageKey="data-grid-pricing-plan"> | |
<codeblock> |
but maybe we do, a general one seems more appropriate.
<codeblock storageKey="data-grid-pricing-plan"> | |
<codeblock storageKey="pricing-plan"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that was my initial thought, but then I thought it might be better to have a separate key for the data grid and pickers because there's no Premium plan in pickers. With separate storage keys, you can have Pro for the pickers and Premium for the grid.
Not a strong opinion though 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could have special handling for this case in the docs-infra.
f39f4dc
to
bd09ccc
Compare
We got this feedback recently:
While I couldn't reproduce the issue, it makes sense to augment the package that you actually use.
Preview: https://deploy-preview-9668--material-ui-x.netlify.app/x/react-data-grid/components/#custom-slot-props-with-typescript