Skip to content

Commit

Permalink
feat: add styles for unsupported message attachment (#294)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela authored May 9, 2024
1 parent f67dca7 commit 0e59ba5
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/v2/styles/AttachmentList/AttachmentList-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,32 @@
}
}

.str-chat__message-attachment-unsupported {
@include utils.flex-row-center;
padding: var(--str-chat__spacing-2);
column-gap: var(--str-chat__spacing-4);
margin: var(--str-chat__attachment-margin);

.str-chat__file-icon {
width: calc(var(--str-chat__spacing-px)* 30);
}

.str-chat__message-attachment-unsupported__metadata {
min-width: 0;
flex: 1;
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;

}

.str-chat__message-attachment-unsupported__title {
@include utils.ellipsis-text;
max-width: 100%;
}
}

.str-chat__message-attachment-file--item,
.str-chat__message-attachment-audio-widget {
@include utils.flex-row-center;
Expand Down
8 changes: 8 additions & 0 deletions src/v2/styles/AttachmentList/AttachmentList-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -320,10 +320,18 @@
background-size: 24px 24px;
}

.str-chat__message-attachment-unsupported,
.str-chat__message-attachment-file--item {
@include utils.component-layer-overrides('file-attachment');
}

.str-chat__message-attachment-unsupported {
.str-chat__message-attachment-unsupported__title {
font: var(--str-chat__subtitle-medium-text);
word-break: keep-all;
}
}

.str-chat__message-attachment-file--item,
.str-chat__message-attachment-audio-widget {
.str-chat__message-attachment-file--item-name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
}
}

.str-chat__attachment-preview-unsupported,
.str-chat__attachment-preview-voice-recording,
.str-chat__attachment-preview-file {
display: flex;
Expand All @@ -68,6 +69,7 @@
align-items: flex-start;
justify-content: center;

.str-chat__attachment-preview-title,
.str-chat__attachment-preview-file-name {
@include utils.ellipsis-text;
max-width: 100%;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,12 @@
}
}

.str-chat__attachment-preview-unsupported,
.str-chat__attachment-preview-voice-recording,
.str-chat__attachment-preview-file {
@include utils.component-layer-overrides('attachment-preview-file');

.str-chat__attachment-preview-title,
.str-chat__attachment-preview-file-name {
font: var(--str-chat__subtitle-medium-text);
}
Expand Down

0 comments on commit 0e59ba5

Please sign in to comment.