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

[pickers] Use PaperProps in mobile pickers #6223

Closed
wants to merge 5 commits into from

Conversation

LukasTy
Copy link
Member

@LukasTy LukasTy commented Sep 20, 2022

Part of #6218

To apply styling overrides to both desktop and mobile picker versions popups we currently would need to provide duplicate props:

// overrides style in desktop version
PaperProps={{
  sx: {
    '.MuiPickersCalendarHeader-label': {
      fontSize: 'initial',
    },
  },
}}
// overrides style in mobile version
DialogProps={{
  sx: {
    '.MuiPickersCalendarHeader-label': {
      fontSize: 'initial',
    },
  },
}}

After these changes passing only the following prop would apply changes to both desktop and mobile pickers popup/dialog:

PaperProps={{
  sx: {
    '.MuiPickersCalendarHeader-label': {
      fontSize: 'initial',
    },
  },
}}

@LukasTy LukasTy added component: pickers This is the name of the generic UI component, not the React module! mobile Targets mobile platform labels Sep 20, 2022
@mui-bot
Copy link

mui-bot commented Sep 20, 2022

These are the results for the performance tests:

Test case Unit Min Max Median Mean σ
Filter 100k rows ms 481.9 796 611.9 632 117.891
Sort 100k rows ms 530.6 1,002 639.1 763.26 167.006
Select 100k rows ms 178.2 228.1 218.3 207.02 20.018
Deselect 100k rows ms 129.6 197.9 184.5 175.18 24.293

Generated by 🚫 dangerJS against ef5fe91

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Sep 21, 2022
@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Oct 4, 2022
@flaviendelangle
Copy link
Member

This PR is going to be replaced by #6381 to avoid breaking its api just a few days after the introduction of this api.

I checked that with Lukas

@alexfauquette
Copy link
Member

Don't know if we should merge it or let's wait for #6381

@flaviendelangle
Copy link
Member

Too fast 😆

@flaviendelangle
Copy link
Member

Closing this one 👍

@LukasTy LukasTy deleted the use-paper-props-in-mobile-picker branch January 26, 2023 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! mobile Targets mobile platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants