• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

davidhu2000 / react-spinners / 14454568390

14 Apr 2025 07:58PM UTC coverage: 71.708% (-2.7%) from 74.385%
14454568390

Pull #631

github

web-flow
Merge 50241a8ab into 1842afb62
Pull Request #631: chore: update-all-packages

1154 of 1753 branches covered (65.83%)

Branch coverage included in aggregate %.

18 of 25 new or added lines in 14 files covered. (72.0%)

120 existing lines in 23 files now uncovered.

1122 of 1421 relevant lines covered (78.96%)

6.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

70.08
/src/PuffLoader.tsx
1
import * as React from "react";
2

1✔
3
import { cssValue } from "./helpers/unitConverter";
1!
4
import { LoaderSizeProps } from "./helpers/props";
×
5
import { createAnimation } from "./helpers/animation";
×
6

×
7
const puff = [
×
8
  createAnimation("PuffLoader", "0% {transform: scale(0)} 100% {transform: scale(1.0)}", "puff-1"),
9
  createAnimation("PuffLoader", "0% {opacity: 1} 100% {opacity: 0}", "puff-2"),
×
10
];
11

1✔
12
function PuffLoader({
13
  loading = true,
1!
14
  color = "#000000",
41!
15
  speedMultiplier = 1,
41✔
16
  cssOverride = {},
41!
17
  size = 60,
41✔
18
  ...additionalprops
19
}: LoaderSizeProps): React.JSX.Element | null {
41✔
20
  const wrapper: React.CSSProperties = {
21
    display: "inherit",
×
22
    position: "relative",
×
23
    width: cssValue(size),
24
    height: cssValue(size),
1!
25
    ...cssOverride,
1✔
26
  };
27

×
28
  const style = (i: number): React.CSSProperties => {
29
    return {
1✔
30
      position: "absolute",
1✔
31
      height: cssValue(size),
1!
UNCOV
32
      width: cssValue(size),
×
UNCOV
33
      border: `thick solid ${color}`,
×
UNCOV
34
      borderRadius: "50%",
×
35
      opacity: "1",
36
      top: "0",
1✔
37
      left: "0",
38
      animationFillMode: "both",
1✔
39
      animation: `${puff[0]}, ${puff[1]}`,
1!
40
      animationDuration: `${2 / speedMultiplier}s`,
1✔
41
      animationIterationCount: "infinite",
41!
42
      animationTimingFunction:
1✔
43
        "cubic-bezier(0.165, 0.84, 0.44, 1), cubic-bezier(0.3, 0.61, 0.355, 1)",
1✔
44
      animationDelay: i === 1 ? "-1s" : "0s",
45
    };
46
  };
1✔
47

3✔
48
  if (!loading) {
3✔
49
    return null;
1✔
50
  }
3!
51

3✔
UNCOV
52
  return (
×
UNCOV
53
    <span style={wrapper} {...additionalprops}>
×
54
      <span style={style(1)} />
55
      <span style={style(2)} />
3✔
56
    </span>
57
  );
1✔
58
}
1✔
59

1✔
60
export default PuffLoader;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc