Lighten blue (link) text for dim and dark themes (#11164)
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import {useCallback, useMemo} from 'react'
|
||||
import {LayoutAnimation, type TextStyle} from 'react-native'
|
||||
import {msg} from '@lingui/core/macro'
|
||||
import {useLingui} from '@lingui/react'
|
||||
import {Trans} from '@lingui/react/macro'
|
||||
import {Trans, useLingui} from '@lingui/react/macro'
|
||||
|
||||
import {HITSLOP_10} from '#/lib/constants'
|
||||
import {atoms as a, flatten, type TextStyleProp, useTheme} from '#/alf'
|
||||
@@ -14,7 +12,7 @@ export function ShowMoreTextButton({
|
||||
style,
|
||||
}: TextStyleProp & {onPress: () => void}) {
|
||||
const t = useTheme()
|
||||
const {_} = useLingui()
|
||||
const {t: l} = useLingui()
|
||||
|
||||
const onPress = useCallback(() => {
|
||||
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut)
|
||||
@@ -30,7 +28,7 @@ export function ShowMoreTextButton({
|
||||
|
||||
return (
|
||||
<Button
|
||||
label={_(msg`Expand post text`)}
|
||||
label={l`Expand post text`}
|
||||
onPress={onPress}
|
||||
style={[
|
||||
a.self_start,
|
||||
@@ -43,13 +41,13 @@ export function ShowMoreTextButton({
|
||||
<Text
|
||||
style={[
|
||||
textStyle,
|
||||
t.atoms.text_link,
|
||||
{
|
||||
color: t.palette.primary_500,
|
||||
opacity: pressed ? 0.6 : 1,
|
||||
textDecorationLine: hovered ? 'underline' : undefined,
|
||||
},
|
||||
]}>
|
||||
<Trans>Show More</Trans>
|
||||
<Trans>Show more</Trans>
|
||||
</Text>
|
||||
)}
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user