|
| 1 | +import { motion } from 'framer-motion'; |
| 2 | + |
| 3 | +const Bar = ({ x, y, height }: { x: string; y: string; height: string }) => { |
| 4 | + return ( |
| 5 | + <motion.rect |
| 6 | + animate={{ |
| 7 | + translateX: [-17, -17, -34, -34, -51, -51, -68, -68, -85, -85, -102, -102, -119, -119, -136, -136], |
| 8 | + }} |
| 9 | + transition={{ |
| 10 | + duration: 8, |
| 11 | + ease: 'easeInOut', |
| 12 | + times: [0.085, 0.125, 0.21, 0.25, 0.335, 0.375, 0.46, 0.5, 0.585, 0.625, 0.71, 0.75, 0.835, 0.875, 0.96, 1], |
| 13 | + repeat: Infinity, |
| 14 | + }} |
| 15 | + x={x} |
| 16 | + y={y} |
| 17 | + width="16.7692" |
| 18 | + height={height} |
| 19 | + fill="#FDA36A" |
| 20 | + /> |
| 21 | + ); |
| 22 | +}; |
| 23 | + |
| 24 | +export const ChartMotion = () => { |
| 25 | + return ( |
| 26 | + <svg xmlns="http://www.w3.org/2000/svg" width="466" height="216" viewBox="0 0 466 216" fill="none"> |
| 27 | + <g clipPath="url(#clip0_6339_210185)"> |
| 28 | + <Bar x="28" y="123" height="64" /> |
| 29 | + <Bar x="60.7695" y="59" height="128" /> |
| 30 | + <Bar x="93.5391" y="139" height="48" /> |
| 31 | + <Bar x="126.309" y="139" height="48" /> |
| 32 | + <Bar x="159.076" y="123" height="64" /> |
| 33 | + <Bar x="191.846" y="123" height="64" /> |
| 34 | + <Bar x="224.615" y="99" height="88" /> |
| 35 | + <Bar x="257.385" y="29" height="158" /> |
| 36 | + <Bar x="290" y="59" height="128" /> |
| 37 | + <Bar x="322.924" y="115" height="72" /> |
| 38 | + <Bar x="355.691" y="59" height="128" /> |
| 39 | + <Bar x="388.461" y="29" height="158" /> |
| 40 | + <Bar x="421.23" y="115" height="72" /> |
| 41 | + <Bar x="454" y="123" height="64" /> |
| 42 | + <Bar x="486.77" y="139" height="128" /> |
| 43 | + <Bar x="519.539" y="139" height="48" /> |
| 44 | + <Bar x="552.309" y="139" height="48" /> |
| 45 | + <Bar x="585.076" y="123" height="64" /> |
| 46 | + <Bar x="617.846" y="123" height="64" /> |
| 47 | + </g> |
| 48 | + <path d="M28 187H438" stroke="#E93D47" /> |
| 49 | + <rect x="0.5" y="0.5" width="465" height="215" rx="7.5" stroke="#C2BDBA" /> |
| 50 | + <defs> |
| 51 | + <clipPath id="clip0_6339_210185"> |
| 52 | + <rect width="410" height="158" fill="white" transform="translate(28 29)" /> |
| 53 | + </clipPath> |
| 54 | + </defs> |
| 55 | + </svg> |
| 56 | + ); |
| 57 | +}; |
0 commit comments