Skip to content

[docs] Add warning to array spacing section #46542

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii added docs Improvements or additions to the documentation package: material-ui Specific to @mui/material labels Jul 15, 2025
@mui-bot
Copy link

mui-bot commented Jul 15, 2025

Netlify deploy preview

Bundle size report

Bundle Parsed Size Gzip Size
@mui/material 0B(0.00%) 0B(0.00%)
@mui/lab 0B(0.00%) 0B(0.00%)
@mui/system 0B(0.00%) 0B(0.00%)
@mui/utils 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against bc28b64

@cherniavskii cherniavskii requested a review from a team July 15, 2025 19:25
@cherniavskii cherniavskii marked this pull request as ready for review July 15, 2025 19:25
const spacings = [0, 4, 8, 16, 32, 64];

const theme = createTheme({
spacing: (factor: number | 'auto' = 0) => {
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli Jul 21, 2025

Choose a reason for hiding this comment

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

Does theme.spacing() without any arguments here match with the current behavior? That is, it returns the first value in the spacing array (i.e., index 0)? Is this the current behviour? So, in this case theme.spacing() would be 0.

@DiegoAndai DiegoAndai requested a review from siriwatknp July 23, 2025 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[data grid] Using an array for theme.spacing causes error spam in console ("The theme.spacing array type cannot be combined with non integer values")
3 participants