Skip to content

Commit

Permalink
do not fake the type of exported component
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfauquette committed May 15, 2024
1 parent 4dc48a9 commit e15d286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/x-charts/src/BarChart/BarElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<BarProps>;
}));

interface BarProps
extends Omit<
Expand Down Expand Up @@ -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<BarProps>);

const barProps = useSlotProps({
elementType: Bar,
Expand Down

0 comments on commit e15d286

Please sign in to comment.