[DatePicker] Migrate YearPicker to emotion#25928
Conversation
docs/pages/api-docs/year-picker.json
Outdated
| }, | ||
| "name": "YearPicker", | ||
| "styles": { "classes": ["root"], "globalClasses": {}, "name": "MuiYearPicker" }, | ||
| "styles": { "classes": [], "globalClasses": {}, "name": null }, |
There was a problem hiding this comment.
Not sure how to bring the "root" and "name" back 🤔 @oliviertassinari @mnajdova
|
@material-ui/lab: parsed: +0.09% , gzip: +0.09% |
| 'componentsProp', | ||
| 'propsSpread', | ||
| 'reactTestRenderer', | ||
| 'themeDefaultProps', |
There was a problem hiding this comment.
I need to skip themeDetaultProps because the current implementation does not receive "other" props. I tried to add "other" props to YearPickerRoot like in other component but then receive picker-related props that leak to DOM (ex, mask, inputFormat, ...) in demos
There was a problem hiding this comment.
Looks like propsSpread is also skipped so it makes sense. Maybe we could introduce testDefaultProps option where we can specify some prop that exists in the API with specific value and test for it, for example minDate in this case.
437ae51 to
2058f10
Compare
| import TimelineContext from './TimelineContext'; | ||
| import { getTimelineUtilityClass } from './timelineClasses'; | ||
|
|
||
| export type TimelineClassKey = 'root' | 'alignLeft' | 'alignRight' | 'alignAlternate'; |
There was a problem hiding this comment.
Please extract this to a separate PR
| 'componentsProp', | ||
| 'propsSpread', | ||
| 'reactTestRenderer', | ||
| 'themeDefaultProps', |
There was a problem hiding this comment.
Looks like propsSpread is also skipped so it makes sense. Maybe we could introduce testDefaultProps option where we can specify some prop that exists in the API with specific value and test for it, for example minDate in this case.
mnajdova
left a comment
There was a problem hiding this comment.
Looks good, we could probably add testDefaultProps option where we can specify some prop that exists in the API with a specific value and test for it, for example, minDate in this case, but to be honest, not sure if it is worthed.
One of #24405