Skip to content

Commit 10b4a9d

Browse files
authored
fix: message content inner container style overflow issue (#2961)
* fix: message content inner container style overflow issue * fix: tests snapshot
1 parent eb86009 commit 10b4a9d

File tree

2 files changed

+31
-13
lines changed

2 files changed

+31
-13
lines changed

package/src/components/Message/MessageSimple/MessageContent.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const styles = StyleSheet.create({
3838
borderTopLeftRadius: 16,
3939
borderTopRightRadius: 16,
4040
borderWidth: 1,
41+
overflow: 'hidden',
4142
},
4243
leftAlignContent: {
4344
justifyContent: 'flex-start',
@@ -154,6 +155,7 @@ const MessageContentWithContext = <
154155
borderRadiusS,
155156
borderTopLeftRadius,
156157
borderTopRightRadius,
158+
...container
157159
},
158160
containerInner,
159161
replyBorder,
@@ -251,7 +253,7 @@ const MessageContentWithContext = <
251253
});
252254
}
253255
}}
254-
style={({ pressed }) => ({ opacity: pressed ? 0.5 : 1 })}
256+
style={({ pressed }) => [{ opacity: pressed ? 0.5 : 1 }, container]}
255257
{...additionalPressableProps}
256258
>
257259
<View onLayout={onLayout} style={wrapper}>

package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -573,9 +573,12 @@ exports[`Thread should match thread snapshot 1`] = `
573573
onResponderTerminationRequest={[Function]}
574574
onStartShouldSetResponder={[Function]}
575575
style={
576-
{
577-
"opacity": 1,
578-
}
576+
[
577+
{
578+
"opacity": 1,
579+
},
580+
{},
581+
]
579582
}
580583
>
581584
<View
@@ -589,6 +592,7 @@ exports[`Thread should match thread snapshot 1`] = `
589592
"borderTopLeftRadius": 16,
590593
"borderTopRightRadius": 16,
591594
"borderWidth": 1,
595+
"overflow": "hidden",
592596
},
593597
{
594598
"backgroundColor": "#E9EAED",
@@ -1079,9 +1083,12 @@ exports[`Thread should match thread snapshot 1`] = `
10791083
onResponderTerminationRequest={[Function]}
10801084
onStartShouldSetResponder={[Function]}
10811085
style={
1082-
{
1083-
"opacity": 1,
1084-
}
1086+
[
1087+
{
1088+
"opacity": 1,
1089+
},
1090+
{},
1091+
]
10851092
}
10861093
>
10871094
<View
@@ -1095,6 +1102,7 @@ exports[`Thread should match thread snapshot 1`] = `
10951102
"borderTopLeftRadius": 16,
10961103
"borderTopRightRadius": 16,
10971104
"borderWidth": 1,
1105+
"overflow": "hidden",
10981106
},
10991107
{
11001108
"backgroundColor": "#E9EAED",
@@ -1623,9 +1631,12 @@ exports[`Thread should match thread snapshot 1`] = `
16231631
onResponderTerminationRequest={[Function]}
16241632
onStartShouldSetResponder={[Function]}
16251633
style={
1626-
{
1627-
"opacity": 1,
1628-
}
1634+
[
1635+
{
1636+
"opacity": 1,
1637+
},
1638+
{},
1639+
]
16291640
}
16301641
>
16311642
<View
@@ -1639,6 +1650,7 @@ exports[`Thread should match thread snapshot 1`] = `
16391650
"borderTopLeftRadius": 16,
16401651
"borderTopRightRadius": 16,
16411652
"borderWidth": 1,
1653+
"overflow": "hidden",
16421654
},
16431655
{
16441656
"backgroundColor": "#E9EAED",
@@ -2122,9 +2134,12 @@ exports[`Thread should match thread snapshot 1`] = `
21222134
onResponderTerminationRequest={[Function]}
21232135
onStartShouldSetResponder={[Function]}
21242136
style={
2125-
{
2126-
"opacity": 1,
2127-
}
2137+
[
2138+
{
2139+
"opacity": 1,
2140+
},
2141+
{},
2142+
]
21282143
}
21292144
>
21302145
<View
@@ -2138,6 +2153,7 @@ exports[`Thread should match thread snapshot 1`] = `
21382153
"borderTopLeftRadius": 16,
21392154
"borderTopRightRadius": 16,
21402155
"borderWidth": 1,
2156+
"overflow": "hidden",
21412157
},
21422158
{
21432159
"backgroundColor": "#E9EAED",

0 commit comments

Comments
 (0)