Files
ETB/ETB-FrontEnd/node_modules/@mui/x-charts/esm/BarChart/AnimatedBarElement.js
Iliyan Angelov 306b20e24a Frontend start
2025-09-14 00:54:48 +03:00

21 lines
917 B
JavaScript

'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,
"data-highlighted": ownerState.isHighlighted || undefined,
"data-faded": ownerState.isFaded || undefined
}, animatedProps));
}