UNPKG

@helpwave/hightide

Version:

helpwave's component and theming library

1 lines 3.18 kB
{"version":3,"sources":["../../../src/components/icons-and-geometry/Helpwave.tsx"],"sourcesContent":["import type { SVGProps } from 'react'\nimport { clsx } from 'clsx'\n\nexport type HelpwaveProps = SVGProps<SVGSVGElement> & {\n color?: string,\n animate?: 'none' | 'loading' | 'pulse' | 'bounce',\n size?: number,\n}\n\n/**\n * The helpwave loading spinner based on the svg logo.\n */\nexport const Helpwave = ({\n color = 'currentColor',\n animate = 'none',\n size = 64,\n ...props\n }: HelpwaveProps) => {\n const isLoadingAnimation = animate === 'loading'\n let svgAnimationKey = ''\n\n if (animate === 'pulse') {\n svgAnimationKey = 'animate-pulse'\n } else if (animate === 'bounce') {\n svgAnimationKey = 'animate-bounce'\n }\n\n if (size < 0) {\n console.error('size cannot be less than 0')\n size = 64\n }\n\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 888 888\"\n fill=\"none\"\n strokeLinecap=\"round\"\n strokeWidth={48}\n {...props}\n >\n <g className={clsx(svgAnimationKey)}>\n <path className={clsx({ 'animate-wave-big-left-up': isLoadingAnimation })}\n d=\"M144 543.235C144 423.259 232.164 326 340.92 326\" stroke={color} strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-big-right-down': isLoadingAnimation })}\n d=\"M537.84 544.104C429.084 544.104 340.92 446.844 340.92 326.869\" stroke={color} strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-small-left-up': isLoadingAnimation })}\n d=\"M462.223 518.035C462.223 432.133 525.348 362.495 603.217 362.495\" stroke={color}\n strokeDasharray=\"1000\"/>\n <path className={clsx({ 'animate-wave-small-right-down': isLoadingAnimation })}\n d=\"M745.001 519.773C666.696 519.773 603.218 450.136 603.218 364.233\" stroke={color}\n strokeDasharray=\"1000\"/>\n </g>\n </svg>\n )\n}\n"],"mappings":";AACA,SAAS,YAAY;AAyCf,SACE,KADF;AA9BC,IAAM,WAAW,CAAC;AAAA,EACE,QAAQ;A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