Skip to content
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][system] Add documentation on how to augment custom theme types for the sx prop callback #39259

Merged

Conversation

3xp10it3r
Copy link
Contributor

@3xp10it3r 3xp10it3r commented Oct 1, 2023

This PR consists documentation for accessing custom properties in sx prop callback without typescript error by extending the theme type from @mui/system.

Fixes #38862

Preview: https://deploy-preview-39259--material-ui.netlify.app/system/getting-started/the-sx-prop/#callback-values

@mui-bot
Copy link

mui-bot commented Oct 1, 2023

Netlify deploy preview

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against ca245cd

@zannager zannager added docs Improvements or additions to the documentation package: system Specific to @mui/system labels Oct 2, 2023
@zannager zannager requested a review from mnajdova October 2, 2023 16:21
@ZeeshanTamboli ZeeshanTamboli changed the title [docs] Access custom properties in sx prop callback without typescript error by extending theme type from @mui/system [docs][system] Add documentation on how to augment theme types for the sx prop callback Oct 6, 2023
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@3xp10it3r, I thought it would be best to include it in the sx prop documentation page under the callback value section. To avoid confusion, I went ahead and made the changes myself. Thanks for your contribution!

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work typescript customization: theme Centered around the theming features labels Oct 6, 2023
@ZeeshanTamboli ZeeshanTamboli changed the title [docs][system] Add documentation on how to augment theme types for the sx prop callback [docs][system] Add documentation on how to augment custom theme types for the sx prop callback Oct 6, 2023
@ZeeshanTamboli ZeeshanTamboli merged commit 9319b80 into mui:master Oct 6, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Oct 9, 2023
… for the `sx` prop callback (mui#39259)

Co-authored-by: Digvijay Gupta <[email protected]>
Co-authored-by: ZeeshanTamboli <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work customization: theme Centered around the theming features docs Improvements or additions to the documentation package: system Specific to @mui/system typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[docs] Add documentation on how to augment Theme types for the sx prop callback
4 participants