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

[DateRangePicker] Migrate DateRangePickerDay to emotion #26368

Merged
merged 12 commits into from
May 21, 2021

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented May 19, 2021

Explanation on some points

  • need to case unknown to DateRangePickerDayDay to cast type to PickersDay because it needs to accept generic

  • no need to use useThemeProps in this component, so themeDefaultProps is skipped.

  • I have followed (at least) the PR section of the contributing guide.

@mui-pr-bot
Copy link

mui-pr-bot commented May 19, 2021

Details of bundle changes (experimental)

@material-ui/lab: parsed: +0.26% , gzip: +0.14%

Generated by 🚫 dangerJS against 37b3ba0

@siriwatknp siriwatknp marked this pull request as ready for review May 19, 2021 06:56
styleProps.isHighlighting && {
color: theme.palette.getContrastText(alpha(theme.palette.primary.light, 0.6)),
}),
})) as unknown) as <TDate>(
Copy link
Member Author

Choose a reason for hiding this comment

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

unknown is needed for workaround with styleProps, otherwise got this error.
image

I think to improve this, styleProps in experimental_styled should be a generic with default type of Record<string, unknown>

@siriwatknp siriwatknp added the component: date range picker This is the name of the generic UI component, not the React module! label May 21, 2021
@siriwatknp siriwatknp merged commit faadfef into mui:next May 21, 2021
@siriwatknp siriwatknp deleted the date-range-picker-day-emotion branch May 21, 2021 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: date range picker This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants