Completed
Push — main ( 8ca39d...9cc399 )
by Cataldo
03:32
created

src/components/molecules/Spinner/icons.tsx

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 79
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 0
eloc 66
mnd 0
bc 0
fnc 0
dl 0
loc 79
ccs 3
cts 3
cp 1
bpm 0
cpm 0
noi 0
c 0
b 0
f 0
1 1
import React from "react";
2
3
import { SpinnerProps } from "./types";
4
5 1
const ICONS: Record<SpinnerProps["value"], JSX.Element> = {
6
  loading: (
7
    <svg
8
      id="Layer_1"
9
      version="1.1"
10
      viewBox="0 0 512 512"
11
      xmlns="http://www.w3.org/2000/svg"
12
      x="0"
13
      y="0"
14
      xmlSpace="preserve"
15
      className="rotating"
16
    >
17
      <path
18
        className="st0"
19
        d="M281.6 409.6c28.3 0 51.2 22.9 51.2 51.2 0 28.3-22.9 51.2-51.2 51.2s-51.2-22.9-51.2-51.2c0-28.3 22.9-51.2 51.2-51.2zm-160.2-76.8c35.4 0 64 28.7 64 64s-28.6 64-64 64-64-28.6-64-64 28.6-64 64-64zm296.4 12.8c28.3 0 51.2 22.9 51.2 51.2 0 28.3-22.9 51.2-51.2 51.2s-51.2-22.9-51.2-51.2c0-28.3 22.9-51.2 51.2-51.2zm55.8-107c21.2 0 38.4 17.2 38.4 38.4s-17.2 38.4-38.4 38.4-38.4-17.2-38.4-38.4 17.2-38.4 38.4-38.4zM64 153.6c35.3 0 64 28.6 64 64s-28.7 64-64 64-64-28.7-64-64 28.6-64 64-64zm391.3-20.3c14.1 0 25.6 11.5 25.6 25.6 0 14.2-11.5 25.6-25.6 25.6s-25.6-11.4-25.6-25.6c0-14.1 11.5-25.6 25.6-25.6zM204.8 0c42.4 0 76.8 34.4 76.8 76.8s-34.4 76.8-76.8 76.8S128 119.2 128 76.8 162.4 0 204.8 0zm192 76.8c7.1 0 12.8 5.7 12.8 12.8 0 7.1-5.7 12.8-12.8 12.8-7.1 0-12.8-5.7-12.8-12.8 0-7.1 5.7-12.8 12.8-12.8z"
20
      />
21
    </svg>
22
  ),
23
  success: (
24
    <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
25
      <defs>
26
        <linearGradient
27
          id="a"
28
          gradientUnits="userSpaceOnUse"
29
          x1="258.596"
30
          x2="258.461"
31
          y1="446.746"
32
          y2="64.887"
33
        >
34
          <stop offset="0" stopColor="#05bc29" />
35
          <stop offset="1" stopColor="#5bf877" />
36
        </linearGradient>
37
      </defs>
38
      <path
39
        d="m173.898 439.404-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001Z"
40
        fill="url(#a)"
41
      />
42
    </svg>
43
  ),
44
  error: (
45
    <svg version="1.0" viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
46
      <path
47
        style={{
48
          fill: "none",
49
          fillRule: "evenodd",
50
          stroke: "red",
51
          strokeWidth: "18.05195999",
52
          strokeLinecap: "butt",
53
          strokeLinejoin: "miter",
54
          strokeMiterlimit: "4",
55
          strokeDasharray: "none",
56
          strokeOpacity: "1",
57
        }}
58
        d="m6.39 6.42 87.19 87.19"
59
      />
60
      <path
61
        style={{
62
          fill: "none",
63
          fillRule: "evenodd",
64
          stroke: "red",
65
          strokeWidth: "17.80202103",
66
          strokeLinecap: "butt",
67
          strokeLinejoin: "miter",
68
          strokeMiterlimit: "4",
69
          strokeDasharray: "none",
70
          strokeOpacity: "1",
71
        }}
72
        d="M6.39 93.61 93.83 6.42"
73
      />
74
    </svg>
75
  ),
76
};
77
78
export default ICONS;
79