Skip to content

Commit 083e8fe

Browse files
Separate DropzoneContainer styling from MessageInput
1 parent 8f302b2 commit 083e8fe

File tree

7 files changed

+40
-33
lines changed

7 files changed

+40
-33
lines changed

src/v2/styles/DragAndDropContainer/DragAmdDropContainer-layout.scss renamed to src/v2/styles/DragAndDropContainer/DragAndDropContainer-layout.scss

File renamed without changes.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.str-chat__dropzone-container {
2+
@include utils.flex-row-center;
3+
4+
position: absolute;
5+
height: 100%;
6+
width: 100%;
7+
z-index: 5;
8+
9+
p {
10+
margin: unset;
11+
}
12+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
.str-chat {
2+
/* The text/icon color of the dropzone container */
3+
--str-chat__dropzone-container-color: var(--str-chat__on-primary-color);
4+
5+
/* The background color of the dropzone container */
6+
--str-chat__dropzone-container-background-color: var(--str-chat__primary-overlay-color);
7+
8+
/* The backdrop filter applied to the dropzone container */
9+
--str-chat__dropzone-container-backdrop-filter: blur(3px);
10+
}
11+
12+
.str-chat__dropzone-container {
13+
background-color: var(--str-chat__dropzone-container-background-color);
14+
color: var(--str-chat__dropzone-container-color);
15+
backdrop-filter: var(--str-chat__dropzone-container-backdrop-filter);
16+
font: var(--str-chat__subtitle-text);
17+
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@
2626
}
2727
}
2828

29-
.str-chat__dropzone-container {
30-
@include utils.flex-row-center;
31-
32-
position: absolute;
33-
height: 100%;
34-
width: 100%;
35-
z-index: 5;
36-
37-
p {
38-
margin: unset;
39-
}
40-
}
41-
4229
.str-chat__message-input-inner {
4330
flex-grow: 1;
4431
width: 100%;

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

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,6 @@
2525
/* Box shadow applied to the component */
2626
--str-chat__message-input-box-shadow: none;
2727

28-
/* The text/icon color of the dropzone container */
29-
--str-chat__dropzone-container-color: var(--str-chat__on-primary-color);
30-
31-
/* The background color of the dropzone container */
32-
--str-chat__dropzone-container-background-color: var(--str-chat__primary-overlay-color);
33-
34-
/* The backdrop filter applied to the dropzone container */
35-
--str-chat__dropzone-container-backdrop-filter: blur(3px);
36-
3728
/* The border radius used for the borders of the textarea */
3829
--str-chat__message-textarea-border-radius: var(--str-chat__border-radius-md);
3930

@@ -179,19 +170,14 @@
179170
--str-chat__attachment-selector-actions-menu-button-icon-color: var(--str-chat__primary-color);
180171

181172
/* Color applied to an attachment selector menu item icon when hovered over or focused */
182-
--str-chat__attachment-selector-actions-menu-button-icon-color-active: var(--str-chat__primary-color);
173+
--str-chat__attachment-selector-actions-menu-button-icon-color-active: var(
174+
--str-chat__primary-color
175+
);
183176
}
184177

185178
.str-chat__message-input {
186179
@include utils.component-layer-overrides('message-input');
187180

188-
.str-chat__dropzone-container {
189-
background-color: var(--str-chat__dropzone-container-background-color);
190-
color: var(--str-chat__dropzone-container-color);
191-
backdrop-filter: var(--str-chat__dropzone-container-backdrop-filter);
192-
font: var(--str-chat__subtitle-text);
193-
}
194-
195181
.str-chat__file-input-container {
196182
--str-chat-icon-color: var(--str-chat__message-input-tools-color);
197183
@include utils.component-layer-overrides('message-input-tools');
@@ -326,11 +312,14 @@
326312
background-color: var(--str-chat__attachment-selector-actions-menu-button-icon-color);
327313
}
328314

329-
&:hover, &:focus {
315+
&:hover,
316+
&:focus {
330317
color: var(--str-chat__text-color);
331318

332319
.str-chat__dialog-menu__button-icon {
333-
background-color: var(--str-chat__attachment-selector-actions-menu-button-icon-color-active);
320+
background-color: var(
321+
--str-chat__attachment-selector-actions-menu-button-icon-color-active
322+
);
334323
}
335324
}
336325
}

src/v2/styles/index.layout.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
@use 'common/CTAButton/CTAButton-layout';
1717
@use 'common/CircleFAButton/CircleFAButton-layout';
1818
@use 'Dialog/Dialog-layout';
19-
@use 'DragAndDropContainer/DragAmdDropContainer-layout';
19+
@use 'DragAndDropContainer/DragAndDropContainer-layout';
20+
@use 'DropzoneContainer/DropzoneContainer-layout';
2021
@use 'EditMessageForm/EditMessageForm-layout';
2122
@use 'Form/Form-layout';
2223
@use 'ImageCarousel/ImageCarousel-layout';

src/v2/styles/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
@use 'ChannelSearch/ChannelSearch-theme';
2020
@use 'Dialog/Dialog-theme';
2121
@use 'DragAndDropContainer/DragAndDropContainer-theme';
22+
@use 'DropzoneContainer/DropzoneContainer-theme';
2223
@use 'EditMessageForm/EditMessageForm-theme';
2324
@use 'Form/Form-theme';
2425
@use 'Icon/Icon-theme';

0 commit comments

Comments
 (0)