Skip to content

[DateRangePicker] Migrate DateRangePickerDay to emotion#26368

Merged
siriwatknp merged 12 commits intomui:nextfrom
siriwatknp:date-range-picker-day-emotion
May 21, 2021
Merged

[DateRangePicker] Migrate DateRangePickerDay to emotion#26368
siriwatknp merged 12 commits intomui:nextfrom
siriwatknp:date-range-picker-day-emotion

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: DateRangePicker The React component 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
@zannager zannager added the scope: pickers Changes related to the date/time pickers. label Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: DateRangePicker The React component scope: pickers Changes related to the date/time pickers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants