diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-06-04 02:49:50 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 00:49:50 +0100 |
commit | 891b432eadb6b4a1907943b1219631e1b84329d2 (patch) | |
tree | 4540d5ee5fc146c030774dea31f3d45565c06d1c /src/view/com/composer/threadgate/ThreadgateBtn.tsx | |
parent | 3b55f61d5f0111287be56b76a1a342256d3f2a95 (diff) | |
download | voidsky-891b432eadb6b4a1907943b1219631e1b84329d2.tar.zst |
Composer - add animated bottom border (#4325)
* start adding bottom border (wip) * add content change listener * add layout listener and move to hook * remove logs * use square-er image icon * visually align bottom bar icons * reduce keyboard vertical offset slightly * only add border to top/bottom * run worklet function on UI thread
Diffstat (limited to 'src/view/com/composer/threadgate/ThreadgateBtn.tsx')
-rw-r--r-- | src/view/com/composer/threadgate/ThreadgateBtn.tsx | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/view/com/composer/threadgate/ThreadgateBtn.tsx b/src/view/com/composer/threadgate/ThreadgateBtn.tsx index afc9f5bfa..2aefdfbbf 100644 --- a/src/view/com/composer/threadgate/ThreadgateBtn.tsx +++ b/src/view/com/composer/threadgate/ThreadgateBtn.tsx @@ -1,5 +1,6 @@ import React from 'react' -import {Keyboard, View} from 'react-native' +import {Keyboard, StyleProp, ViewStyle} from 'react-native' +import Animated, {AnimatedStyle} from 'react-native-reanimated' import {msg} from '@lingui/macro' import {useLingui} from '@lingui/react' @@ -16,9 +17,11 @@ import {Group3_Stroke2_Corner0_Rounded as Group} from '#/components/icons/Group' export function ThreadgateBtn({ threadgate, onChange, + style, }: { threadgate: ThreadgateSetting[] onChange: (v: ThreadgateSetting[]) => void + style?: StyleProp<AnimatedStyle<ViewStyle>> }) { const {track} = useAnalytics() const {_} = useLingui() @@ -46,7 +49,7 @@ export function ThreadgateBtn({ : _(msg`Some people can reply`) return ( - <View style={[a.flex_row, a.py_xs, a.px_sm, t.atoms.bg]}> + <Animated.View style={[a.flex_row, a.p_sm, t.atoms.bg, style]}> <Button variant="solid" color="secondary" @@ -59,6 +62,6 @@ export function ThreadgateBtn({ /> <ButtonText>{label}</ButtonText> </Button> - </View> + </Animated.View> ) } |