File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/components/primitives/Button Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -96,8 +96,6 @@ const Button = (
96
96
) ;
97
97
}
98
98
99
- const boxChildren = isLoading && isLoadingText ? isLoadingText : children ;
100
-
101
99
const spinnerElement = spinner ? (
102
100
spinner
103
101
) : (
@@ -127,14 +125,12 @@ const Button = (
127
125
{ ...resolvedProps }
128
126
accessibilityRole = { props . accessibilityRole ?? 'button' }
129
127
>
130
- < HStack { ..._stack } >
128
+ < HStack { ..._stack } space = { isLoading && ! isLoadingText ? 0 : 2 } >
131
129
{ startIcon && ! isLoading ? startIcon : null }
132
130
{ 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 >
138
134
{ endIcon && ! isLoading ? endIcon : null }
139
135
{ isLoading && spinnerPlacement === 'end' ? spinnerElement : null }
140
136
</ HStack >
You can’t perform that action at this time.
0 commit comments