Skip to content

Commit

Permalink
update slots name
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Nov 18, 2024
1 parent 2db1eac commit 514a4e6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/mui-material/src/Tooltip/Tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -723,20 +723,20 @@ const Tooltip = React.forwardRef(function Tooltip(inProps, ref) {
className: clsx(classes.popper, PopperProps?.className),
});

const [TooltipTransitionSlot, transitionSlotProps] = useSlot('transition', {
const [TransitionSlot, transitionSlotProps] = useSlot('transition', {
elementType: Grow,
externalForwardedProps,
ownerState,
});

const [TooltipTooltipSlot, tooltipSlotProps] = useSlot('tooltip', {
const [TooltipSlot, tooltipSlotProps] = useSlot('tooltip', {
elementType: TooltipTooltip,
className: classes.tooltip,
externalForwardedProps,
ownerState,
});

const [TooltipArrowSlot, arrowSlotProps] = useSlot('arrow', {
const [ArrowSlot, arrowSlotProps] = useSlot('arrow', {
elementType: TooltipArrow,
className: classes.arrow,
externalForwardedProps,
Expand Down Expand Up @@ -773,16 +773,16 @@ const Tooltip = React.forwardRef(function Tooltip(inProps, ref) {
popperOptions={popperOptions}
>
{({ TransitionProps: TransitionPropsInner }) => (
<TooltipTransitionSlot
<TransitionSlot
timeout={theme.transitions.duration.shorter}
{...TransitionPropsInner}
{...transitionSlotProps}
>
<TooltipTooltipSlot {...tooltipSlotProps}>
<TooltipSlot {...tooltipSlotProps}>
{title}
{arrow ? <TooltipArrowSlot {...arrowSlotProps} /> : null}
</TooltipTooltipSlot>
</TooltipTransitionSlot>
{arrow ? <ArrowSlot {...arrowSlotProps} /> : null}
</TooltipSlot>
</TransitionSlot>
)}
</PopperSlot>
</React.Fragment>
Expand Down

0 comments on commit 514a4e6

Please sign in to comment.