Align interaction states of read more
This commit is contained in:
@@ -72,14 +72,22 @@ export const ThreadItemReadMore = memo(function ThreadItemReadMore({
|
|||||||
to={item.href}
|
to={item.href}
|
||||||
style={[a.pt_sm, a.pb_md, a.gap_xs]}>
|
style={[a.pt_sm, a.pb_md, a.gap_xs]}>
|
||||||
{({hovered, pressed}) => {
|
{({hovered, pressed}) => {
|
||||||
|
const interacted = hovered || pressed
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CirclePlus fill={t.atoms.text_contrast_high.color} width={18} />
|
<CirclePlus
|
||||||
|
fill={
|
||||||
|
interacted
|
||||||
|
? t.atoms.text_contrast_high.color
|
||||||
|
: t.atoms.text_contrast_low.color
|
||||||
|
}
|
||||||
|
width={18}
|
||||||
|
/>
|
||||||
<Text
|
<Text
|
||||||
style={[
|
style={[
|
||||||
a.text_sm,
|
a.text_sm,
|
||||||
t.atoms.text_contrast_medium,
|
t.atoms.text_contrast_medium,
|
||||||
(hovered || pressed) && a.underline,
|
interacted && a.underline,
|
||||||
]}>
|
]}>
|
||||||
<Trans>
|
<Trans>
|
||||||
Read {item.moreReplies} more{' '}
|
Read {item.moreReplies} more{' '}
|
||||||
|
|||||||
@@ -46,13 +46,12 @@ export const ThreadItemReadMoreUp = memo(function ThreadItemReadMoreUp({
|
|||||||
},
|
},
|
||||||
]}>
|
]}>
|
||||||
<UpIcon
|
<UpIcon
|
||||||
fill="currentColor"
|
fill={
|
||||||
|
interacted
|
||||||
|
? t.atoms.text_contrast_high.color
|
||||||
|
: t.atoms.text_contrast_low.color
|
||||||
|
}
|
||||||
width={24}
|
width={24}
|
||||||
style={[
|
|
||||||
t.atoms.text_contrast_low,
|
|
||||||
a.transition_all,
|
|
||||||
interacted && [t.atoms.text_contrast_high],
|
|
||||||
]}
|
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<Text
|
<Text
|
||||||
|
|||||||
Reference in New Issue
Block a user