diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-05-30 03:25:11 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-30 01:25:11 +0100 |
commit | 165feedb866034452807eb87b39efe3ba780184f (patch) | |
tree | 768d026477ea1db382f5786f4d5028c041545a2d /src/components/Button.tsx | |
parent | 4d39ef2e19632eddc1a31a5b41078f6e40b92fbc (diff) | |
download | voidsky-165feedb866034452807eb87b39efe3ba780184f.tar.zst |
Use ALF for post controls (#3400)
* alf the repost dropdown on web + import icons * alf like icon * convert other post controls * add missing padding to share button * refine buttons and use better icons * revert buttonicon changes * remove ButtonIcon and ButtonText from repost dialog * use 15px font size when not big * reduce size and use contrast_25 * add hover state to logged out view * add `userSelect: 'none'` to buttons * use width rather than height * fix quote close behaviour * prettier * Fix Esc on repost * Use new icons for placeholder * Fix placeholder --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
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} |