diff options
Diffstat (limited to 'src/components/Button.tsx')
-rw-r--r-- | src/components/Button.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/components/Button.tsx b/src/components/Button.tsx index a008c8605..3db803399 100644 --- a/src/components/Button.tsx +++ b/src/components/Button.tsx @@ -71,6 +71,7 @@ export type ButtonProps = Pick< testID?: string label: string style?: StyleProp<ViewStyle> + hoverStyle?: StyleProp<ViewStyle> children: NonTextElements | ((context: ButtonContext) => NonTextElements) } @@ -96,6 +97,7 @@ export function Button({ label, disabled = false, style, + hoverStyle: hoverStyleProp, ...rest }: ButtonProps) { const t = useTheme() @@ -374,7 +376,9 @@ export function Button({ a.align_center, a.justify_center, flattenedBaseStyles, - ...(state.hovered || state.pressed ? hoverStyles : []), + ...(state.hovered || state.pressed + ? [hoverStyles, flatten(hoverStyleProp)] + : []), flatten(style), ]} onPressIn={onPressIn} |