UNPKG

@nex-ui/react

Version:

🎉 A beautiful, modern, and reliable React component library.

52 lines (49 loc) • 1.41 kB
import { jsx } from 'react/jsx-runtime'; import { LazyMotion } from 'motion/react'; import * as m from 'motion/react-m'; import { motionFeatures } from '../utils/motionFeatures/index.mjs'; const tickVariants = { checked: { pathLength: 1, opacity: 1, transition: { opacity: { delay: 0.2, duration: 0.1 }, pathLength: { duration: 0.2, delay: 0.2, ease: 'easeInOut' } } }, unchecked: { pathLength: 0, opacity: 0 } }; const CheckedIcon = ({ checked })=>{ return /*#__PURE__*/ jsx(LazyMotion, { features: motionFeatures, children: /*#__PURE__*/ jsx(m.svg, { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", strokeWidth: "1.5", stroke: "currentColor", initial: false, "aria-hidden": true, focusable: false, animate: checked ? 'checked' : 'unchecked', children: /*#__PURE__*/ jsx(m.path, { strokeLinecap: "round", strokeLinejoin: "round", d: "m7 12.9l3.143 3.6L18 7.5", variants: tickVariants }) }) }); }; CheckedIcon.displayName = 'CheckedIcon'; export { CheckedIcon };