From e15d286d0aa060401bbd7b4398f2bdabc70ed532 Mon Sep 17 00:00:00 2001 From: alexandre Date: Wed, 15 May 2024 10:28:52 +0200 Subject: [PATCH] do not fake the type of exported component --- packages/x-charts/src/BarChart/BarElement.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/x-charts/src/BarChart/BarElement.tsx b/packages/x-charts/src/BarChart/BarElement.tsx index 358173bcb0154..81a0f86d434e9 100644 --- a/packages/x-charts/src/BarChart/BarElement.tsx +++ b/packages/x-charts/src/BarChart/BarElement.tsx @@ -60,7 +60,7 @@ export const BarElementPath = styled(animated.rect, { : ownerState.color, transition: 'opacity 0.2s ease-in, fill 0.2s ease-in', opacity: (ownerState.isFaded && 0.3) || 1, -})) as React.ElementType; +})); interface BarProps extends Omit< @@ -139,7 +139,7 @@ function BarElement(props: BarElementProps) { }; const classes = useUtilityClasses(ownerState); - const Bar = slots?.bar ?? BarElementPath; + const Bar = slots?.bar ?? (BarElementPath as React.ElementType); const barProps = useSlotProps({ elementType: Bar,