Skip to content

Commit 27a8fdd

Browse files
feat: add styling for MessageBlocked component (#327)
### 🎯 Goal Adds styling for MessageBlocked component. Ref: GetStream/stream-chat-react#2675
1 parent 886fc55 commit 27a8fdd

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

src/v2/styles/Message/Message-layout.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@
120120
grid-template-areas: 'message';
121121
}
122122

123+
&.str-chat__message--blocked {
124+
grid-template-areas: 'message';
125+
}
126+
123127
&.str-chat__message--system {
124128
grid-template-areas: 'message';
125129
grid-template-columns: auto;
@@ -260,6 +264,10 @@
260264
@include chat-bubble-spacing;
261265
}
262266

267+
.str-chat__message--blocked-inner {
268+
@include chat-bubble-spacing;
269+
}
270+
263271
.str-chat__quoted-message-bubble {
264272
@include chat-bubble-spacing;
265273
display: flex;

src/v2/styles/Message/Message-theme.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,30 @@
118118
/* Box shadow applied to a deleted message */
119119
--str-chat__deleted-message-box-shadow: none;
120120

121+
/* The border radius used for the borders of a deleted message */
122+
--str-chat__blocked-message-border-radius: var(--str-chat__border-radius-md);
123+
124+
/* The text/icon of a deleted message */
125+
--str-chat__blocked-message-color: var(--str-chat__text-low-emphasis-color);
126+
127+
/* The background of a deleted message */
128+
--str-chat__blocked-message-background-color: var(--str-chat__secondary-surface-color);
129+
130+
/* Top border of a deleted message */
131+
--str-chat__blocked-message-border-block-start: none;
132+
133+
/* Bottom border of a deleted message */
134+
--str-chat__blocked-message-border-block-end: none;
135+
136+
/* Left (right in RTL layout) border of a deleted message */
137+
--str-chat__blocked-message-border-inline-start: none;
138+
139+
/* Right (left in RTL layout) border of a deleted message */
140+
--str-chat__blocked-message-border-inline-end: none;
141+
142+
/* Box shadow applied to a deleted message */
143+
--str-chat__blocked-message-box-shadow: none;
144+
121145
/* The border radius used for the borders of a system message */
122146
--str-chat__system-message-border-radius: 0;
123147

@@ -214,6 +238,11 @@
214238
font: var(--str-chat__body2-text);
215239
}
216240

241+
.str-chat__message--blocked-inner {
242+
@include utils.component-layer-overrides('blocked-message');
243+
font: var(--str-chat__body2-text);
244+
}
245+
217246
&.str-chat__message--me .str-chat__message-bubble {
218247
color: var(--str-chat__own-message-bubble-color);
219248
background-color: var(--str-chat__own-message-bubble-background-color);

0 commit comments

Comments
 (0)