Total Complexity | 0 |
Complexity/F | 0 |
Lines of Code | 89 |
Function Count | 0 |
Duplicated Lines | 0 |
Ratio | 0 % |
Coverage | 100% |
Changes | 0 |
1 | 1 | import React from "react"; |
|
2 | |||
3 | import { SpinnerProps } from "./types"; |
||
4 | |||
5 | 1 | const DEFAULT_ICONS: Record<SpinnerProps["value"], JSX.Element> = { |
|
6 | loading: ( |
||
7 | <svg |
||
8 | data-id="loading-icon" |
||
9 | id="Layer_1" |
||
10 | version="1.1" |
||
11 | viewBox="0 0 512 512" |
||
12 | xmlns="http://www.w3.org/2000/svg" |
||
13 | x="0" |
||
14 | y="0" |
||
15 | xmlSpace="preserve" |
||
16 | className="rotating" |
||
17 | > |
||
18 | <path |
||
19 | className="st0" |
||
20 | 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" |
||
21 | /> |
||
22 | </svg> |
||
23 | ), |
||
24 | success: ( |
||
25 | <svg |
||
26 | viewBox="0 0 512 512" |
||
27 | xmlns="http://www.w3.org/2000/svg" |
||
28 | data-id="success-icon" |
||
29 | > |
||
30 | <defs> |
||
31 | <linearGradient |
||
32 | id="a" |
||
33 | gradientUnits="userSpaceOnUse" |
||
34 | x1="258.596" |
||
35 | x2="258.461" |
||
36 | y1="446.746" |
||
37 | y2="64.887" |
||
38 | > |
||
39 | <stop offset="0" stopColor="#05bc29" /> |
||
40 | <stop offset="1" stopColor="#5bf877" /> |
||
41 | </linearGradient> |
||
42 | </defs> |
||
43 | <path |
||
44 | 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" |
||
45 | fill="url(#a)" |
||
46 | /> |
||
47 | </svg> |
||
48 | ), |
||
49 | error: ( |
||
50 | <svg |
||
51 | version="1.0" |
||
52 | viewBox="0 0 100 100" |
||
53 | xmlns="http://www.w3.org/2000/svg" |
||
54 | data-id="error-icon" |
||
55 | > |
||
56 | <path |
||
57 | style={{ |
||
58 | fill: "none", |
||
59 | fillRule: "evenodd", |
||
60 | stroke: "red", |
||
61 | strokeWidth: "18.05195999", |
||
62 | strokeLinecap: "butt", |
||
63 | strokeLinejoin: "miter", |
||
64 | strokeMiterlimit: "4", |
||
65 | strokeDasharray: "none", |
||
66 | strokeOpacity: "1", |
||
67 | }} |
||
68 | d="m6.39 6.42 87.19 87.19" |
||
69 | /> |
||
70 | <path |
||
71 | style={{ |
||
72 | fill: "none", |
||
73 | fillRule: "evenodd", |
||
74 | stroke: "red", |
||
75 | strokeWidth: "17.80202103", |
||
76 | strokeLinecap: "butt", |
||
77 | strokeLinejoin: "miter", |
||
78 | strokeMiterlimit: "4", |
||
79 | strokeDasharray: "none", |
||
80 | strokeOpacity: "1", |
||
81 | }} |
||
82 | d="M6.39 93.61 93.83 6.42" |
||
83 | /> |
||
84 | </svg> |
||
85 | ), |
||
86 | }; |
||
87 | |||
88 | export default DEFAULT_ICONS; |
||
89 |