diff options
author | Samuel Newman <mozzius@protonmail.com> | 2024-11-22 13:41:24 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 13:41:24 +0000 |
commit | a5dbb35237d014a07c0f3f82e9dffce67129e542 (patch) | |
tree | 0475684ee6191b0231727de7f8d7027e28a44ae8 | |
parent | a0acd514abd83c444575616cc3b920a846c2fd08 (diff) | |
download | voidsky-a5dbb35237d014a07c0f3f82e9dffce67129e542.tar.zst |
Use outline style for repost cancel button (#6509)
* use outline style for repost cancel button * use trans macro in JSX
-rw-r--r-- | src/view/com/util/post-ctrls/RepostButton.tsx | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/view/com/util/post-ctrls/RepostButton.tsx b/src/view/com/util/post-ctrls/RepostButton.tsx index eb7505d2e..06b1fcaf6 100644 --- a/src/view/com/util/post-ctrls/RepostButton.tsx +++ b/src/view/com/util/post-ctrls/RepostButton.tsx @@ -1,6 +1,6 @@ import React, {memo, useCallback} from 'react' import {View} from 'react-native' -import {msg, plural} from '@lingui/macro' +import {msg, plural, Trans} from '@lingui/macro' import {useLingui} from '@lingui/react' import {POST_CTRL_HITSLOP} from '#/lib/constants' @@ -151,9 +151,11 @@ let RepostButtonDialogInner = ({ color="primary"> <Repost size="lg" fill={t.palette.primary_500} /> <Text style={[a.font_bold, a.text_xl]}> - {isReposted - ? _(msg`Remove repost`) - : _(msg({message: `Repost`, context: 'action'}))} + {isReposted ? ( + <Trans>Remove repost</Trans> + ) : ( + <Trans context="action">Repost</Trans> + )} </Text> </Button> <Button @@ -183,9 +185,11 @@ let RepostButtonDialogInner = ({ a.text_xl, embeddingDisabled && t.atoms.text_contrast_low, ]}> - {embeddingDisabled - ? _(msg`Quote posts disabled`) - : _(msg`Quote post`)} + {embeddingDisabled ? ( + <Trans>Quote posts disabled</Trans> + ) : ( + <Trans>Quote post</Trans> + )} </Text> </Button> </View> @@ -193,9 +197,11 @@ let RepostButtonDialogInner = ({ label={_(msg`Cancel quote post`)} onPress={onPressClose} size="large" - variant="solid" + variant="outline" color="primary"> - <ButtonText>{_(msg`Cancel`)}</ButtonText> + <ButtonText> + <Trans>Cancel</Trans> + </ButtonText> </Button> </View> </Dialog.ScrollableInner> |