Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -787,19 +787,15 @@ exports[`AttachButton should call handleAttachButtonPress when the button is cli
}
>
<View
pointerEvents="box-none"
style={
[
{
"height": 0,
},
{
"transform": [
{
"translateY": 0,
},
],
},
]
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
Expand Down Expand Up @@ -1708,19 +1704,15 @@ exports[`AttachButton should render a enabled AttachButton 1`] = `
}
>
<View
pointerEvents="box-none"
style={
[
{
"height": 0,
},
{
"transform": [
{
"translateY": 0,
},
],
},
]
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
Expand Down Expand Up @@ -2629,19 +2621,15 @@ exports[`AttachButton should render an disabled AttachButton 1`] = `
}
>
<View
pointerEvents="box-none"
style={
[
{
"height": 0,
},
{
"transform": [
{
"translateY": 0,
},
],
},
]
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,19 +785,15 @@ exports[`SendButton should render a SendButton 1`] = `
}
>
<View
pointerEvents="box-none"
style={
[
{
"height": 0,
},
{
"transform": [
{
"translateY": 0,
},
],
},
]
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
Expand Down Expand Up @@ -1704,19 +1700,15 @@ exports[`SendButton should render a disabled SendButton 1`] = `
}
>
<View
pointerEvents="box-none"
style={
[
{
"height": 0,
},
{
"transform": [
{
"translateY": 0,
},
],
},
]
{
"bottom": 0,
"left": 0,
"position": "absolute",
"right": 0,
"top": 0,
}
}
>
<View
Expand Down
47 changes: 30 additions & 17 deletions package/src/components/MessageMenu/MessageActionListItem.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';
import React, { useMemo } from 'react';
import { StyleProp, StyleSheet, Text, TextStyle, View } from 'react-native';

import { Pressable } from 'react-native-gesture-handler';
Expand Down Expand Up @@ -63,12 +63,12 @@ export const MessageActionListItem = (props: MessageActionListItemProps) => {
const {
theme: {
semantics,
colors: { black },
messageMenu: {
actionListItem: { container, icon: iconTheme, title: titleTheme },
},
},
} = useTheme();
const styles = useStyles();

const onActionPress = useStableCallback(() => {
closeOverlay();
Expand All @@ -88,23 +88,36 @@ export const MessageActionListItem = (props: MessageActionListItemProps) => {
style={[styles.container, container]}
>
<View style={iconTheme}>{icon}</View>
<Text style={[styles.titleStyle, { color: black }, titleStyle, titleTheme]}>{title}</Text>
<Text style={[styles.titleStyle, titleStyle, titleTheme]}>{title}</Text>
</View>
</Pressable>
);
};

const styles = StyleSheet.create({
buttonContainer: {
borderRadius: primitives.radiusLg,
},
container: {
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'flex-start',
padding: primitives.spacingXs,
},
titleStyle: {
paddingLeft: primitives.spacingXs,
},
});
const useStyles = () => {
const {
theme: { semantics },
} = useTheme();
return useMemo(
() =>
StyleSheet.create({
buttonContainer: {
borderRadius: primitives.radiusLg,
},
container: {
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'flex-start',
padding: primitives.spacingXs,
},
titleStyle: {
paddingLeft: primitives.spacingXs,
fontWeight: primitives.typographyFontWeightMedium,
fontSize: primitives.typographyFontSizeMd,
lineHeight: primitives.typographyLineHeightNormal,
color: semantics.textPrimary,
},
}),
[semantics.textPrimary],
);
};
Loading