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 components slots on every component #4466

Closed
8 of 9 tasks
flaviendelangle opened this issue Apr 12, 2022 · 0 comments
Closed
8 of 9 tasks

[pickers] Use components slots on every component #4466

flaviendelangle opened this issue Apr 12, 2022 · 0 comments
Assignees
Labels
component: pickers This is the name of the generic UI component, not the React module! dx Related to developers' experience new feature New feature or request umbrella For grouping multiple issues to provide a holistic view v6.x

Comments

@flaviendelangle
Copy link
Member

flaviendelangle commented Apr 12, 2022

Intended behavior

  • Replace all the props.XXXComponent and props.XXXProps by slots
  • Always have a componentsProps slot matching the components slot
  • Use useSlotProps and SlotComponentProps for every slot

Related issues

Components

I grouped the slots, we can do one PR per group.
You can take example on #5890 which clean the slots for the PickerArrowSwitcher component

Slots of PickerArrowSwitcher (#5890)

Slots LeftArrowButton, RightArrowButton, LeftArrowIcon, RightArrowIcon

  • Replace all the props.XXXComponent and props.XXXProps by slots
  • Always have a componentsProps slot matching the components slot
  • Use useSlotProps and SlotComponentProps for every slot

Slots of PickersCalendarHeaderSlotsComponent (#6943)

Slots: SwitchViewButton, SwitchViewIcon

  • Replace all the props.XXXComponent and props.XXXProps by slots
  • Always have a componentsProps slot matching the components slot (missing switchViewIcon)
  • Use useSlotProps and SlotComponentProps for every slot

Slots of PureDateInput / KeyboardDateInput

Slots: OpenPickerIcon, InputAdornment (current props.InputAdornmentProps), OpenPickerButton (current props.OpenPickerButtonProps), Input (current props.InputProps)

REMOVED ON V6

Slots of PickersViewLayout (#6381)

Slots: Paper (current props.PaperProps), Popper (current props.PopperProps), Transition (current props.TransitionComponent), PaperContent, ActionBar, TrapFocus (current props.TrapFocusProps), Dialog (current props.DialogProps), Tabs and Toolbar (current props.ToolbarComponent)

  • Replace all the props.XXXComponent and props.XXXProps by slots
  • Always have a componentsProps slot matching the components slot
  • Use useSlotProps and SlotComponentProps for every slot
@flaviendelangle flaviendelangle added new feature New feature or request component: pickers This is the name of the generic UI component, not the React module! labels Apr 12, 2022
@flaviendelangle flaviendelangle self-assigned this Apr 21, 2022
@joserodolfofreitas joserodolfofreitas added the dx Related to developers' experience label Jun 6, 2022
@flaviendelangle flaviendelangle removed their assignment Sep 8, 2022
@joserodolfofreitas joserodolfofreitas added this to Q4 2022 Oct - Dec in MUI X public roadmap Oct 7, 2022
@flaviendelangle flaviendelangle self-assigned this Dec 13, 2022
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! dx Related to developers' experience new feature New feature or request umbrella For grouping multiple issues to provide a holistic view v6.x
Projects
None yet
Development

No branches or pull requests

2 participants