Skip to content

Commit ab5e594

Browse files
committed
feat: Angular SDK emoji picker
1 parent cbc8884 commit ab5e594

6 files changed

Lines changed: 38 additions & 3 deletions

File tree

src/styles/Message.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,12 @@
370370
border: 1px solid var(--border);
371371
margin-left: 0; /* set spacing when unfocused */
372372

373+
// Fixes emoji display in Chrome https://bugs.chromium.org/p/chromium/issues/detail?id=596223
374+
.str-chat__emoji-display-fix {
375+
display: inline-block;
376+
width: 20px;
377+
}
378+
373379
p {
374380
/* Make sure really long urls and words don't break out.
375381
** https://css-tricks.com/snippets/css/prevent-long-urls-from-breaking-out-of-container/ */

src/styles/MessageInputFlat.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108

109109
.str-chat__textarea {
110110
flex: 1;
111+
112+
&.str-chat-angular__textarea {
113+
position: relative;
114+
}
111115
}
112116

113117
.str-chat__textarea > textarea {
@@ -142,6 +146,13 @@
142146
padding: 0;
143147
background-color: transparent;
144148

149+
&.str-chat-angular__emojiselect {
150+
max-width: 28px;
151+
top: 50%;
152+
transform: translateY(-50%);
153+
cursor: initial;
154+
}
155+
145156
svg {
146157
fill: var(--black);
147158
opacity: 0.5;

src/styles/ReactionList.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
}
4747
}
4848

49-
.emoji-mart-emoji {
49+
.emoji-mart-emoji,
50+
.str-chat__emoji {
5051
display: flex;
5152
}
5253

src/styles/ReactionSelector.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ button.str-chat__message-reactions-list-item {
143143
}
144144
}
145145

146-
.emoji-mart-emoji:hover {
146+
.emoji-mart-emoji:hover,
147+
.str-chat__emoji:hover {
147148
transition: 0.1s;
148149
transform: scale(1.2);
149150
cursor: pointer;

src/styles/SimpleReactionsList.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
line-height: 1;
4646
}
4747

48-
.emoji-mart-emoji {
48+
.emoji-mart-emoji,
49+
.str-chat__emoji {
4950
&:hover {
5051
transition: transform 0.2s ease-in-out;
5152
transform: scale(1.2);

src/styles/SmallMessageInput.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@
3636
background-color: transparent;
3737
}
3838

39+
.str-chat-angular__emojiselect {
40+
width: auto;
41+
height: auto;
42+
left: 15px;
43+
max-width: 20px;
44+
}
45+
3946
.rfu-file-upload-button {
4047
bottom: 9px;
4148
right: 26px;
@@ -95,6 +102,10 @@
95102
font-size: var(--sm-font);
96103
padding: 10px 44px 8px 8px;
97104

105+
&.str-chat__angular-textarea {
106+
padding: 10px 35px 8px;
107+
}
108+
98109
&:focus {
99110
height: 36px;
100111
}
@@ -108,6 +119,10 @@
108119
font-size: var(--md-font);
109120
}
110121

122+
.str-chat-angular__textarea + .rfu-file-upload-button {
123+
right: 15px;
124+
}
125+
111126
.rfu-file-upload-button {
112127
position: absolute;
113128
cursor: pointer;

0 commit comments

Comments
 (0)