@bluecateng/pelagos-charts
Version:
Chart components
32 lines • 905 B
JavaScript
import PropTypes from 'prop-types';
import { jsx as _jsx } from "react/jsx-runtime";
const list = [[0, 'stop-bg'], [0.125, 'stop-fg'], [0.25, 'stop-bg']];
const LoadingGradient = ({
id,
className
}) => /*#__PURE__*/_jsx("defs", {
children: /*#__PURE__*/_jsx("linearGradient", {
id: id,
className: className,
gradientUnits: "userSpaceOnUse",
children: list.map(([offset, className]) => /*#__PURE__*/_jsx("stop", {
className: className,
offset: offset,
children: /*#__PURE__*/_jsx("animate", {
attributeName: "offset",
dur: "3s",
repeatCount: "indefinite",
from: offset,
to: offset + 0.75,
calcMode: "spline",
keyTimes: "0;1",
keySplines: ".5 0 .5 1"
})
}, offset))
})
});
LoadingGradient.propTypes = {
id: PropTypes.string,
className: PropTypes.string
};
export default LoadingGradient;