Skip to content

Commit ec515b6

Browse files
authored
fix: message action list border overflow (#2167)
1 parent 84b8a13 commit ec515b6

File tree

2 files changed

+45
-44
lines changed

2 files changed

+45
-44
lines changed

package/src/components/MessageOverlay/MessageActionList.tsx

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,6 @@ import { useTheme } from '../../contexts/themeContext/ThemeContext';
1313
import type { DefaultStreamChatGenerics } from '../../types/types';
1414
import { vw } from '../../utils/utils';
1515

16-
const styles = StyleSheet.create({
17-
bottomBorder: {
18-
borderBottomWidth: 1,
19-
},
20-
container: {
21-
borderRadius: 16,
22-
marginTop: 8,
23-
maxWidth: 275,
24-
},
25-
row: {
26-
alignItems: 'center',
27-
flexDirection: 'row',
28-
justifyContent: 'flex-start',
29-
minWidth: vw(65),
30-
paddingHorizontal: 20,
31-
paddingVertical: 10,
32-
},
33-
titleStyle: {
34-
paddingLeft: 20,
35-
},
36-
});
37-
3816
export type MessageActionListPropsWithContext<
3917
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
4018
> = Pick<
@@ -168,3 +146,26 @@ export const MessageActionList = <
168146

169147
return <MemoizedMessageActionList {...{ alignment, messageActions }} {...props} />;
170148
};
149+
150+
const styles = StyleSheet.create({
151+
bottomBorder: {
152+
borderBottomWidth: 1,
153+
},
154+
container: {
155+
borderRadius: 16,
156+
marginTop: 8,
157+
minWidth: vw(65),
158+
overflow: 'hidden',
159+
},
160+
row: {
161+
alignItems: 'center',
162+
flexDirection: 'row',
163+
justifyContent: 'flex-start',
164+
minWidth: vw(65),
165+
paddingHorizontal: 20,
166+
paddingVertical: 10,
167+
},
168+
titleStyle: {
169+
paddingLeft: 20,
170+
},
171+
});

package/src/components/MessageOverlay/MessageActionListItem.tsx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -10,28 +10,6 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
1010
import { vw } from '../../utils/utils';
1111
import type { MessageOverlayPropsWithContext } from '../MessageOverlay/MessageOverlay';
1212

13-
const styles = StyleSheet.create({
14-
bottomBorder: {
15-
borderBottomWidth: 1,
16-
},
17-
container: {
18-
borderRadius: 16,
19-
marginTop: 8,
20-
maxWidth: 275,
21-
},
22-
row: {
23-
alignItems: 'center',
24-
flexDirection: 'row',
25-
justifyContent: 'flex-start',
26-
minWidth: vw(65),
27-
paddingHorizontal: 20,
28-
paddingVertical: 10,
29-
},
30-
titleStyle: {
31-
paddingLeft: 20,
32-
},
33-
});
34-
3513
export type ActionType =
3614
| 'blockUser'
3715
| 'copyMessage'
@@ -122,3 +100,25 @@ export const MessageActionListItem = <
122100
>(
123101
props: MessageActionListItemProps<StreamChatGenerics>,
124102
) => <MemoizedMessageActionListItem {...props} />;
103+
104+
const styles = StyleSheet.create({
105+
bottomBorder: {
106+
borderBottomWidth: 1,
107+
},
108+
container: {
109+
borderRadius: 16,
110+
marginTop: 8,
111+
maxWidth: 275,
112+
},
113+
row: {
114+
alignItems: 'center',
115+
flexDirection: 'row',
116+
justifyContent: 'flex-start',
117+
minWidth: vw(65),
118+
paddingHorizontal: 20,
119+
paddingVertical: 10,
120+
},
121+
titleStyle: {
122+
paddingLeft: 20,
123+
},
124+
});

0 commit comments

Comments
 (0)