Skip to content

Commit fd48a93

Browse files
snapsnapturtleJonah Möller
andauthored
fix: enable props to change the inline spinner (#107)
Co-authored-by: Jonah Möller <j.moeller@mytaxi.com>
1 parent 72203f6 commit fd48a93

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

src/components/InlineSpinner/InlineSpinner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,9 @@ const InlineSpinnerIcon: React.FC<InlineSpinnerProps> = styled.div<InlineSpinner
5050
${compose(margin, sizeVariant)}
5151
`;
5252

53-
const InlineSpinner = () => (
53+
const InlineSpinner = (props: InlineSpinnerProps) => (
5454
<span>
55-
<InlineSpinnerIcon />
55+
<InlineSpinnerIcon {...props} />
5656
</span>
5757
);
5858

src/components/InlineSpinner/__snapshots__/InlineSpinner.spec.tsx.snap

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,20 @@ exports[`InlineSpinner renders in a custom color 1`] = `
77
width: 1.25rem;
88
height: 1.25rem;
99
vertical-align: text-bottom;
10-
border: 0.125rem solid;
10+
border: 0.125rem solid #069D4F;
1111
border-right-color: transparent;
1212
border-radius: 50%;
1313
-webkit-animation: wdnds 750ms linear infinite;
1414
animation: wdnds 750ms linear infinite;
15+
width: 1.25rem;
16+
height: 1.25rem;
17+
border-width: 0.125rem;
1518
}
1619
1720
<span>
1821
<div
1922
class="c0"
23+
color="#069D4F"
2024
/>
2125
</span>
2226
`;
@@ -28,16 +32,20 @@ exports[`InlineSpinner renders the default variant 1`] = `
2832
width: 1.25rem;
2933
height: 1.25rem;
3034
vertical-align: text-bottom;
31-
border: 0.125rem solid;
35+
border: 0.125rem solid #001E3E;
3236
border-right-color: transparent;
3337
border-radius: 50%;
3438
-webkit-animation: wdnds 750ms linear infinite;
3539
animation: wdnds 750ms linear infinite;
40+
width: 1.25rem;
41+
height: 1.25rem;
42+
border-width: 0.125rem;
3643
}
3744
3845
<span>
3946
<div
4047
class="c0"
48+
color="#001E3E"
4149
/>
4250
</span>
4351
`;
@@ -49,16 +57,20 @@ exports[`InlineSpinner renders the small size 1`] = `
4957
width: 1.25rem;
5058
height: 1.25rem;
5159
vertical-align: text-bottom;
52-
border: 0.125rem solid;
60+
border: 0.125rem solid #001E3E;
5361
border-right-color: transparent;
5462
border-radius: 50%;
5563
-webkit-animation: wdnds 750ms linear infinite;
5664
animation: wdnds 750ms linear infinite;
65+
width: 1rem;
66+
height: 1rem;
67+
border-width: 0.1rem;
5768
}
5869
5970
<span>
6071
<div
6172
class="c0"
73+
color="#001E3E"
6274
/>
6375
</span>
6476
`;

0 commit comments

Comments
 (0)