@butternutbox/pawprint-native 0.23.0 → 0.23.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +6 -6
- package/CHANGELOG.md +12 -0
- package/dist/index.cjs +4 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/Button/Button.tsx +8 -3
package/package.json
CHANGED
|
@@ -85,9 +85,14 @@ const StyledButton = styled(Pressable)<{
|
|
|
85
85
|
|
|
86
86
|
const StyledTextWrapper = styled(View)<{
|
|
87
87
|
textOpacity: number
|
|
88
|
-
|
|
88
|
+
fullWidth?: boolean
|
|
89
|
+
}>(({ textOpacity, fullWidth }) => ({
|
|
89
90
|
opacity: textOpacity,
|
|
90
|
-
flex: 1
|
|
91
|
+
// `flexShrink` (not `flex: 1`) so the text wrapper can shrink to let long /
|
|
92
|
+
// translated copy wrap under the button's `minHeight`, WITHOUT growing to
|
|
93
|
+
// fill the row on short copy — which would push a `startIcon`/`endIcon` out
|
|
94
|
+
// to the button edge instead of sitting next to the centred text.
|
|
95
|
+
...(fullWidth ? { flexShrink: 1 } : {})
|
|
91
96
|
}))
|
|
92
97
|
|
|
93
98
|
const StyledSpinnerWrapper = styled(View)({
|
|
@@ -228,7 +233,7 @@ const Button = React.forwardRef<View, ButtonProps>(
|
|
|
228
233
|
{...rest}
|
|
229
234
|
>
|
|
230
235
|
{startIcon && <IconWrapper>{startIcon}</IconWrapper>}
|
|
231
|
-
<StyledTextWrapper textOpacity={loading ? 0 : 1}>
|
|
236
|
+
<StyledTextWrapper textOpacity={loading ? 0 : 1} fullWidth={fullWidth}>
|
|
232
237
|
<Typography
|
|
233
238
|
token={{
|
|
234
239
|
fontFamily: typography.fontFamily,
|