center the trigger

This commit is contained in:
Hailey
2024-05-02 12:06:08 -07:00
parent 6723e43d0c
commit 9a2762c237
2 changed files with 28 additions and 25 deletions
@@ -47,6 +47,7 @@ export function ActionsWrapper({
<View <View
style={[ style={[
a.mr_md, a.mr_md,
a.justify_center,
{ {
marginLeft: 'auto', marginLeft: 'auto',
}, },
+27 -25
View File
@@ -48,37 +48,39 @@ export function MessageItem({
}, [item, next, isFromSelf, isNextFromSelf]) }, [item, next, isFromSelf, isNextFromSelf])
return ( return (
<ActionsWrapper isFromSelf={isFromSelf} message={item}> <View>
<View <ActionsWrapper isFromSelf={isFromSelf} message={item}>
style={[ <View
a.py_sm,
a.px_lg,
a.my_2xs,
a.rounded_md,
{
backgroundColor: isFromSelf
? t.palette.primary_500
: t.palette.contrast_50,
borderRadius: 17,
},
isFromSelf
? {borderBottomRightRadius: isLastInGroup ? 2 : 17}
: {borderBottomLeftRadius: isLastInGroup ? 2 : 17},
]}>
<Text
style={[ style={[
a.text_md, a.py_sm,
a.leading_snug, a.px_lg,
isFromSelf && {color: t.palette.white}, a.my_2xs,
a.rounded_md,
{
backgroundColor: isFromSelf
? t.palette.primary_500
: t.palette.contrast_50,
borderRadius: 17,
},
isFromSelf
? {borderBottomRightRadius: isLastInGroup ? 2 : 17}
: {borderBottomLeftRadius: isLastInGroup ? 2 : 17},
]}> ]}>
{item.text} <Text
</Text> style={[
</View> a.text_md,
a.leading_snug,
isFromSelf && {color: t.palette.white},
]}>
{item.text}
</Text>
</View>
</ActionsWrapper>
<MessageItemMetadata <MessageItemMetadata
message={item} message={item}
isLastInGroup={isLastInGroup} isLastInGroup={isLastInGroup}
style={isFromSelf ? a.text_right : a.text_left} style={isFromSelf ? a.text_right : a.text_left}
/> />
</ActionsWrapper> </View>
) )
} }