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

Consolidate Breaking Changes in Tonic UI v3 #892

Open
cheton opened this issue Jul 11, 2024 · 0 comments
Open

Consolidate Breaking Changes in Tonic UI v3 #892

cheton opened this issue Jul 11, 2024 · 0 comments

Comments

@cheton
Copy link
Member

cheton commented Jul 11, 2024

Breaking Changes in Tonic UI v3

This issue will address the breaking changes introduced in Tonic UI v3.

Use slots and slotProps to replace Component and ComponentProps

Inner element overrides

https://mui.com/material-ui/migration/migrating-from-deprecated-apis/#inner-element-overrides for details

The slots and slotProps APIs are in the process of being standardized. The analogous APIs—components, componentsProps, <SlotName>Component, and <SlotName>Props—are going to be deprecated and eventually removed. This improves the developer experience through consistency, predictability, and reduced cognitive load.

Affected components

The following components are affected by this change:

Name Components Deprecated Props
accordion AccordionContent TransitionComponent
TransitionProps
date-pickers DatePickerContent PopperComponent
PopperProps
TransitionComponent
TransitionProps
drawer DrawerContent TransitionComponent
TransitionProps
drawer DrawerOverlay TransitionComponent
TransitionProps
menu MenuContent PopperComponent
PopperProps
TransitionComponent
TransitionProps
menu SubmenuContent PopperComponent
PopperProps
TransitionComponent
TransitionProps
modal ModalContent TransitionComponent
TransitionProps
modal ModalOverlay TransitionComponent
TransitionProps
popover PopoverContent PopperComponent
PopperProps
PopoverArrowComponent
PopoverArrowProps
TransitionComponent
TransitionProps
toast ToastManager TransitionComponent
TransitionProps
tooltip Tooltip PopperComponent
PopperProps
TooltipArrowComponent
TooltipArrowProps
TransitionComponent
TransitionProps
tooltip TooltipContent PopperComponent
PopperProps
TooltipArrowComponent
TooltipArrowProps
TransitionComponent
TransitionProps
tree TreeItem TransitionComponent
TransitionProps

AccordionContent

TransitionComponent

The AccordionContent's TransitionComponent was deprecated in favor of slots.transition:

 <AccordionContent
-  TransitionComponent={CustomTransition}
+  slots={{ transition: CustomTransition }}
 />

TransitionProps

The AccordionContent's TransitionProps was deprecated in favor of slotProps.transition:

 <AccordionContent
-  TransitionProps={{ unmountOnExit: true }}
+  slotProps={{ transition: { unmountOnExit: true } }}
 />

Component Updates

DatePicker

  • closeOnSelect: The default value has been updated from false to true, so the date picker will now automatically close when a date is selected.
@cheton cheton changed the title Breaking Changes Introduced in Tonic UI v3 Consoliate Breaking Changes in Tonic UI v3 Jul 17, 2024
@cheton cheton changed the title Consoliate Breaking Changes in Tonic UI v3 Consolidate Breaking Changes in Tonic UI v3 Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant