Skip to content

Commit b10819a

Browse files
committed
Fix: Add padding for audio and video messages in nested attachments and quotes
1 parent 30ee683 commit b10819a

2 files changed

Lines changed: 25 additions & 25 deletions

File tree

packages/react/src/views/AttachmentHandler/AudioAttachment.js

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -67,31 +67,12 @@ const AudioAttachment = ({
6767
) : (
6868
''
6969
)}
70-
<Box
71-
css={css`
72-
padding-left: 0.5rem;
73-
`}
74-
>
75-
<AttachmentMetadata
76-
attachment={attachment}
77-
url={host + (attachment.title_url || attachment.audio_url)}
78-
variantStyles={variantStyles}
79-
msg={msg}
80-
onExpandCollapseClick={toggleExpanded}
81-
isExpanded={isExpanded}
82-
/>
83-
</Box>
84-
{isExpanded && (
85-
<audio
86-
src={host + attachment.audio_url}
87-
width="100%"
88-
controls
89-
style={{
90-
paddingLeft: '0.5rem',
91-
paddingBottom: '0.5rem',
92-
}}
93-
/>
94-
)}
70+
<AttachmentMetadata
71+
attachment={attachment}
72+
url={host + (attachment.title_url || attachment.audio_url)}
73+
variantStyles={variantStyles}
74+
/>
75+
<audio src={host + attachment.audio_url} width="100%" controls />
9576

9677
{attachment.attachments &&
9778
attachment.attachments.map((nestedAttachment, index) => (

packages/react/src/views/AttachmentHandler/VideoAttachment.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,25 @@ const VideoAttachment = ({
8181
css={css`
8282
padding-left: 0.5rem;
8383
`}
84+
<<<<<<< HEAD
85+
=======
86+
>
87+
<AttachmentMetadata
88+
attachment={attachment}
89+
url={host + (attachment.title_url || attachment.video_url)}
90+
variantStyles={variantStyles}
91+
/>
92+
</Box>
93+
<video
94+
width={300}
95+
controls
96+
style={{
97+
borderBottomLeftRadius: 'inherit',
98+
borderBottomRightRadius: 'inherit',
99+
paddingLeft: '0.5rem',
100+
paddingBottom: '0.5rem',
101+
}}
102+
>>>>>>> 306ae5b6 (Fix: Add padding for audio and video messages in nested attachments and quotes)
84103
>
85104
<AttachmentMetadata
86105
attachment={attachment}

0 commit comments

Comments
 (0)