UNPKG

@mui/x-charts

Version:

The community edition of MUI X Charts components.

19 lines (18 loc) 803 B
'use client'; import _extends from "@babel/runtime/helpers/esm/extends"; import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose"; const _excluded = ["ownerState", "skipAnimation", "id", "dataIndex", "xOrigin", "yOrigin"]; import * as React from 'react'; import { useAnimateBar } from "../hooks/animation/useAnimateBar.js"; import { jsx as _jsx } from "react/jsx-runtime"; export function AnimatedBarElement(props) { const { ownerState } = props, other = _objectWithoutPropertiesLoose(props, _excluded); const animatedProps = useAnimateBar(props); return /*#__PURE__*/_jsx("rect", _extends({}, other, { filter: ownerState.isHighlighted ? 'brightness(120%)' : undefined, opacity: ownerState.isFaded ? 0.3 : 1 }, animatedProps)); }