mskdev025 commited on
Commit
cf3cdbf
·
verified ·
1 Parent(s): 6288a88

Update components/loading/index.tsx

Browse files

✅ Summary of Fixes:
Unused empty string in
classNames

Removed
""
Unintended
rounded-full

Removed
Accessibility

Added
role="status"
and
aria-label
Class merging

Improved with
classNames
utility

Files changed (1) hide show
  1. components/loading/index.tsx +6 -4
components/loading/index.tsx CHANGED
@@ -9,16 +9,18 @@ function Loading({
9
  }) {
10
  return (
11
  <div
12
- className={classNames("", {
13
- "absolute left-0 top-0 h-full w-full flex items-center justify-center z-20 bg-black/50 rounded-full":
14
  overlay,
15
  })}
16
  >
17
  <svg
18
- className={`size-5 animate-spin text-white ${className}`}
19
  xmlns="http://www.w3.org/2000/svg"
20
  fill="none"
21
  viewBox="0 0 24 24"
 
 
22
  >
23
  <circle
24
  className="opacity-25"
@@ -38,4 +40,4 @@ function Loading({
38
  );
39
  }
40
 
41
- export default Loading;
 
9
  }) {
10
  return (
11
  <div
12
+ className={classNames({
13
+ "absolute left-0 top-0 h-full w-full flex items-center justify-center z-20 bg-black/50":
14
  overlay,
15
  })}
16
  >
17
  <svg
18
+ className={classNames("animate-spin text-white", className, "size-5")}
19
  xmlns="http://www.w3.org/2000/svg"
20
  fill="none"
21
  viewBox="0 0 24 24"
22
+ role="status"
23
+ aria-label="Loading..."
24
  >
25
  <circle
26
  className="opacity-25"
 
40
  );
41
  }
42
 
43
+ export default Loading;