Skip to content

Commit 52d451f

Browse files
[SDK] ensure that the default spinner stroke color gets inherited from the parentnode (#7157)
1 parent c036166 commit 52d451f

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

.changeset/fast-onions-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"thirdweb": patch
3+
---
4+
5+
default the spinner stroke color to currentColor and make the color prop optional

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/fiat/FiatScreenContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ export function FiatScreenContent(props: {
250250
{fiatQuoteQuery.isLoading ? (
251251
<>
252252
Getting price quote
253-
<Spinner size="sm" color="accentButtonText" />
253+
<Spinner size="sm" />
254254
</>
255255
) : (
256256
"Continue"

packages/thirdweb/src/react/web/ui/ConnectWallet/screens/Buy/swap/SwapScreenContent.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ export function SwapScreenContent(props: {
360360
{quoteQuery.isLoading ? (
361361
<>
362362
Getting price quote
363-
<Spinner size="sm" color="accentButtonText" />
363+
<Spinner size="sm" />
364364
</>
365365
) : (
366366
"Continue"

packages/thirdweb/src/react/web/ui/components/Spinner.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ import { StyledCircle, StyledSvg } from "../design-system/elements.js";
99
* @internal
1010
*/
1111
export const Spinner: React.FC<{
12-
color: keyof Theme["colors"];
1312
size: keyof typeof iconSize;
13+
color?: keyof Theme["colors"];
1414
}> = (props) => {
1515
const theme = useCustomTheme();
1616
return (
@@ -26,7 +26,7 @@ export const Spinner: React.FC<{
2626
cy="25"
2727
r="20"
2828
fill="none"
29-
stroke={theme.colors[props.color]}
29+
stroke={props.color ? theme.colors[props.color] : "currentColor"}
3030
strokeWidth={Number(iconSize[props.size]) > 64 ? "2" : "4"}
3131
/>
3232
</Svg>

0 commit comments

Comments
 (0)