A few CSS fixes for message bubbles
This commit is contained in:
parent
c369363e10
commit
a8090d8c66
3 changed files with 46 additions and 9 deletions
|
@ -609,14 +609,17 @@
|
||||||
text-align: center;
|
text-align: center;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
// These should match the paddings from .module-message__container,
|
||||||
|
// effectively "undoing" that padding.
|
||||||
margin: {
|
margin: {
|
||||||
left: -12px;
|
left: -12px;
|
||||||
right: -12px;
|
right: -12px;
|
||||||
top: -10px;
|
top: -10px;
|
||||||
bottom: -15px;
|
bottom: -10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
|
line-height: 0;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
|
||||||
@include light-theme {
|
@include light-theme {
|
||||||
|
@ -637,10 +640,6 @@
|
||||||
border-top-left-radius: 0px;
|
border-top-left-radius: 0px;
|
||||||
border-top-right-radius: 0px;
|
border-top-right-radius: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&--with-collapsed-metadata {
|
|
||||||
margin-bottom: -10px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-message__sticker-container {
|
.module-message__sticker-container {
|
||||||
|
@ -4319,7 +4318,6 @@ $timer-icons: '55', '50', '45', '40', '35', '30', '25', '20', '15', '10', '05',
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
margin: 1px;
|
margin: 1px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
overflow: hidden;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-image--with-background {
|
.module-image--with-background {
|
||||||
|
|
|
@ -1295,6 +1295,48 @@ const stories: Array<MessageStory> = [
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'Sticker',
|
||||||
|
[
|
||||||
|
{
|
||||||
|
title: 'Outgoing Sticker',
|
||||||
|
makeDataProps: () => ({
|
||||||
|
...baseDataProps,
|
||||||
|
direction: 'outgoing',
|
||||||
|
status: 'sent',
|
||||||
|
authorColor: 'green',
|
||||||
|
isSticker: true,
|
||||||
|
attachments: [
|
||||||
|
{
|
||||||
|
url: '/fixtures/512x515-thumbs-up-lincoln.webp',
|
||||||
|
fileName: '512x515-thumbs-up-lincoln.webp',
|
||||||
|
contentType: 'image/webp' as MIMEType,
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Incoming Sticker',
|
||||||
|
makeDataProps: () => ({
|
||||||
|
...baseDataProps,
|
||||||
|
direction: 'incoming',
|
||||||
|
authorColor: 'green',
|
||||||
|
isSticker: true,
|
||||||
|
attachments: [
|
||||||
|
{
|
||||||
|
url: '/fixtures/512x515-thumbs-up-lincoln.webp',
|
||||||
|
fileName: '512x515-thumbs-up-lincoln.webp',
|
||||||
|
contentType: 'image/webp' as MIMEType,
|
||||||
|
width: 128,
|
||||||
|
height: 128,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
],
|
||||||
];
|
];
|
||||||
|
|
||||||
const renderEmojiPicker: AllProps['renderEmojiPicker'] = ({
|
const renderEmojiPicker: AllProps['renderEmojiPicker'] = ({
|
||||||
|
|
|
@ -619,9 +619,6 @@ export class Message extends React.PureComponent<Props, State> {
|
||||||
withContentBelow
|
withContentBelow
|
||||||
? 'module-message__attachment-container--with-content-below'
|
? 'module-message__attachment-container--with-content-below'
|
||||||
: null,
|
: null,
|
||||||
collapseMetadata
|
|
||||||
? 'module-message__attachment-container--with-collapsed-metadata'
|
|
||||||
: null,
|
|
||||||
isSticker && !collapseMetadata
|
isSticker && !collapseMetadata
|
||||||
? 'module-message__sticker-container--with-content-below'
|
? 'module-message__sticker-container--with-content-below'
|
||||||
: null
|
: null
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue