Use outline style for repost cancel button (#6509)

* use outline style for repost cancel button

* use trans macro in JSX
This commit is contained in:
Samuel Newman
2024-11-22 13:41:24 +00:00
committed by GitHub
parent a0acd514ab
commit a5dbb35237
+15 -9
View File
@@ -1,6 +1,6 @@
import React, {memo, useCallback} from 'react' import React, {memo, useCallback} from 'react'
import {View} from 'react-native' import {View} from 'react-native'
import {msg, plural} from '@lingui/macro' import {msg, plural, Trans} from '@lingui/macro'
import {useLingui} from '@lingui/react' import {useLingui} from '@lingui/react'
import {POST_CTRL_HITSLOP} from '#/lib/constants' import {POST_CTRL_HITSLOP} from '#/lib/constants'
@@ -151,9 +151,11 @@ let RepostButtonDialogInner = ({
color="primary"> color="primary">
<Repost size="lg" fill={t.palette.primary_500} /> <Repost size="lg" fill={t.palette.primary_500} />
<Text style={[a.font_bold, a.text_xl]}> <Text style={[a.font_bold, a.text_xl]}>
{isReposted {isReposted ? (
? _(msg`Remove repost`) <Trans>Remove repost</Trans>
: _(msg({message: `Repost`, context: 'action'}))} ) : (
<Trans context="action">Repost</Trans>
)}
</Text> </Text>
</Button> </Button>
<Button <Button
@@ -183,9 +185,11 @@ let RepostButtonDialogInner = ({
a.text_xl, a.text_xl,
embeddingDisabled && t.atoms.text_contrast_low, embeddingDisabled && t.atoms.text_contrast_low,
]}> ]}>
{embeddingDisabled {embeddingDisabled ? (
? _(msg`Quote posts disabled`) <Trans>Quote posts disabled</Trans>
: _(msg`Quote post`)} ) : (
<Trans>Quote post</Trans>
)}
</Text> </Text>
</Button> </Button>
</View> </View>
@@ -193,9 +197,11 @@ let RepostButtonDialogInner = ({
label={_(msg`Cancel quote post`)} label={_(msg`Cancel quote post`)}
onPress={onPressClose} onPress={onPressClose}
size="large" size="large"
variant="solid" variant="outline"
color="primary"> color="primary">
<ButtonText>{_(msg`Cancel`)}</ButtonText> <ButtonText>
<Trans>Cancel</Trans>
</ButtonText>
</Button> </Button>
</View> </View>
</Dialog.ScrollableInner> </Dialog.ScrollableInner>