Skip to content

Commit e13babd

Browse files
committed
fix: isloadingtext not showing option
1 parent 1223f96 commit e13babd

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/components/primitives/Button/Button.tsx

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,6 @@ const Button = (
9696
);
9797
}
9898

99-
const boxChildren = isLoading && isLoadingText ? isLoadingText : children;
100-
10199
const spinnerElement = spinner ? (
102100
spinner
103101
) : (
@@ -127,14 +125,12 @@ const Button = (
127125
{...resolvedProps}
128126
accessibilityRole={props.accessibilityRole ?? 'button'}
129127
>
130-
<HStack {..._stack}>
128+
<HStack {..._stack} space={isLoading && !isLoadingText ? 0 : 2}>
131129
{startIcon && !isLoading ? startIcon : null}
132130
{isLoading && spinnerPlacement === 'start' ? spinnerElement : null}
133-
{boxChildren ? (
134-
<Box _text={_text}>
135-
{isLoading && isLoadingText ? isLoadingText : children}
136-
</Box>
137-
) : null}
131+
<Box _text={_text}>
132+
{isLoading ? (isLoadingText ? isLoadingText : null) : children}
133+
</Box>
138134
{endIcon && !isLoading ? endIcon : null}
139135
{isLoading && spinnerPlacement === 'end' ? spinnerElement : null}
140136
</HStack>

0 commit comments

Comments
 (0)