Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
2f45805
feat: apply themev2 for channel list
szuperaz May 6, 2022
d760ed6
Merge pull request #275 from GetStream/channel-list-poc
szuperaz May 11, 2022
f051392
docs: Document theme and component layer variables #289
szuperaz May 12, 2022
aa3f3e6
Merge pull request #290 from GetStream/document-theme-variables
szuperaz May 16, 2022
f258c2d
docs: Document theme and component layer variables #289
szuperaz May 12, 2022
ecb6acb
feat: Apply theme-v2 to channel list and preview #285
szuperaz May 13, 2022
7728f0b
feat: Add unread badge for themev1 and v2
szuperaz May 16, 2022
6bdef4a
fix: Don't apply unread state to active channel
szuperaz May 16, 2022
dc757bc
feat: Add empty channel list indicator to theme-v2 (theme-v1 updated)
szuperaz May 18, 2022
8a70238
Merge pull request #292 from GetStream/channel-list-and-preview
szuperaz May 18, 2022
7781a84
docs: Fix CSS import statements
szuperaz May 19, 2022
53f746c
feat: Apply theme-v2 for channel and channel header #284
szuperaz May 19, 2022
12df390
docs: Remove theming folder - moved to CSS repo
szuperaz May 20, 2022
0b9a4c1
Merge pull request #294 from GetStream/channel-and-header
szuperaz May 24, 2022
b8ef6a2
fix: Chat layout
szuperaz May 24, 2022
d321798
feat: Apply theme-v2 to message input #283
szuperaz May 27, 2022
d9b0106
feat: Message input theme-v2 missing features #283
szuperaz May 30, 2022
c9611b1
Merge pull request #297 from GetStream/message-input-theme-v2
szuperaz May 31, 2022
567b2a1
Merge pull request #299 from GetStream/message-input-2-themev2
szuperaz Jun 1, 2022
19fcdaa
feat: Apply theme-v2 to message component #282
szuperaz May 31, 2022
8b6b2aa
Merge pull request #300 from GetStream/message-theme-v2
szuperaz Jun 9, 2022
f95044d
chore: Fix workflow file
szuperaz Jun 10, 2022
27ea7e7
fix: Fix emoji picker in sample app
szuperaz Jun 9, 2022
1ec60b7
fix: Design enhancements
szuperaz Jun 10, 2022
1377bce
Merge pull request #305 from GetStream/emoji-selector-fix
szuperaz Jun 13, 2022
65b8297
Merge pull request #308 from GetStream/design-enhancement
szuperaz Jun 14, 2022
898797d
feat: Message reactions #279
szuperaz Jun 14, 2022
73d5864
Merge pull request #309 from GetStream/message-reactions-theming-v2
szuperaz Jun 16, 2022
413fdb0
feat: Modal component theme-v2 #278
szuperaz Jun 17, 2022
0708062
fix: Long quoted message in message input
szuperaz Jun 17, 2022
86047be
Merge pull request #312 from GetStream/modal-theme-v2
szuperaz Jun 20, 2022
3023a26
Merge pull request #313 from GetStream/quote-reply-fix
szuperaz Jun 20, 2022
a61b43d
feat: Apply theme-v2 to typing indicator #281
szuperaz Jun 21, 2022
96a48d8
feat: Increase hit area of message actions buttons
szuperaz Jun 21, 2022
42c4f65
fix: Remove React message notifications class from Angular jump to la…
szuperaz Jun 21, 2022
175ab3a
Merge pull request #316 from GetStream/message-actions-hit-area-enhan…
szuperaz Jun 22, 2022
f577568
Merge pull request #315 from GetStream/typing-indicator-v2
szuperaz Jun 22, 2022
a826a11
feat: Notification theme-v2 #277
szuperaz Jun 20, 2022
8d37d19
feat: Additional error notifications
szuperaz Jun 20, 2022
d7975fe
fix: Context menu and tooltip positioning (theme-v1 and v2)
szuperaz Jun 8, 2022
d5f5f5e
Merge pull request #314 from GetStream/notifications-theme-v2
szuperaz Jun 23, 2022
31a8b23
Merge pull request #317 from GetStream/context-menu-fix
szuperaz Jun 23, 2022
f1ebf83
Merge branch 'master' into theming-v2
szuperaz Jun 23, 2022
c80fc03
fix: Remove React specific CSS class from jump to latest button
szuperaz Jun 24, 2022
20b2a96
Remove device-width API and mobile-press class from message component…
oliverlaz Jun 27, 2022
a30925f
fix: Migrate to ngx-popperjs
szuperaz Jun 27, 2022
76a0e67
fix: Design enhancements and fixes
szuperaz Jun 27, 2022
17e9e23
chore: Copy-css docs
szuperaz May 27, 2022
424f91c
Merge pull request #298 from GetStream/css-copy-docs
szuperaz Jul 5, 2022
d35a785
Merge pull request #337 from GetStream/design-enhancements-2
szuperaz Jul 5, 2022
2fdb9a3
feat: Remove unnecessary slot selectors from thread
szuperaz Jul 11, 2022
ef95f0d
docs: Update customization example app to theme-v2 #291
szuperaz Jul 4, 2022
0b04afa
docs: Update guides and screenshots for theme-v2 #274
szuperaz Jul 4, 2022
80bc686
Merge pull request #342 from GetStream/theme-v2-docs
szuperaz Jul 11, 2022
d434c5b
docs: Create update guide for theme-v4
szuperaz Jul 11, 2022
2697c17
Merge branch 'theming-v2' of github.com:GetStream/stream-chat-angular…
szuperaz Jul 11, 2022
e4c2fa4
chore: Add prelease config for theming-v2, turn on dry run
szuperaz Jul 11, 2022
dbb2287
chore: Test stream-chat-css docs fix
szuperaz Jul 11, 2022
104c225
chore: Create prelease for theming-v2
szuperaz Jul 11, 2022
7c00596
chore(release): 4.0.0-theming-v2.1 [skip ci]
semantic-release-bot Jul 11, 2022
1afd581
Merge branch 'master' into theming-v2
szuperaz Jul 11, 2022
c5aa8a3
chore(release): 4.0.0-theming-v2.2 [skip ci]
semantic-release-bot Jul 11, 2022
4a2b375
docs: Fix HTML sample in responsive guide
szuperaz Jul 13, 2022
b556ddf
fix: Remove unnecessary class from notification list
szuperaz Jul 13, 2022
41a87ca
Merge branch 'theming-v2' of github.com:GetStream/stream-chat-angular…
szuperaz Jul 13, 2022
e443ff4
chore(release): 4.0.0-theming-v2.3 [skip ci]
semantic-release-bot Jul 13, 2022
8ddc0d0
chore: Update stream-chat-css target branch
szuperaz Jul 13, 2022
da8d83d
Merge branch 'theming-v2' of github.com:GetStream/stream-chat-angular…
szuperaz Jul 13, 2022
2dbbb71
feat: stream-chat-css updated
szuperaz Jul 28, 2022
a57f38b
chore: Update CSS docs workflow, and reenable e2e tests
szuperaz Jul 28, 2022
7439d47
Merge pull request #356 from GetStream/update-stream-chat-css
szuperaz Jul 28, 2022
5be145a
chore(release): 4.0.0-theming-v2.4 [skip ci]
semantic-release-bot Jul 28, 2022
896ee0b
feat: Add message mention style to theme-v2
szuperaz Aug 2, 2022
7a70376
chore(release): 4.0.0-theming-v2.5 [skip ci]
semantic-release-bot Aug 2, 2022
07e61fb
docs: Rename theme variables to global variables
szuperaz Aug 3, 2022
12d4a65
feat: Update stream-chat-css
szuperaz Aug 8, 2022
8958280
chore(release): 4.0.0-theming-v2.6 [skip ci]
semantic-release-bot Aug 8, 2022
b5e150f
fix: Add Angular specific selectors to message input
szuperaz Aug 9, 2022
aa29bec
chore(release): 4.0.0-theming-v2.7 [skip ci]
semantic-release-bot Aug 9, 2022
b67855a
Merge branch 'master' into theming-v2
szuperaz Aug 10, 2022
6e5313a
chore(release): 4.0.0-theming-v2.8 [skip ci]
semantic-release-bot Aug 10, 2022
a64638d
feat: Empty commit to trigger a semantic release
szuperaz Aug 10, 2022
69a23e4
Merge branch 'theming-v2' of github.com:GetStream/stream-chat-angular…
szuperaz Aug 10, 2022
32c99a7
chore(release): 4.0.0-theming-v2.9 [skip ci]
semantic-release-bot Aug 10, 2022
9ea2386
feat: Video sizing update
szuperaz Aug 12, 2022
a99fe63
Merge branch 'theming-v2' of github.com:GetStream/stream-chat-angular…
szuperaz Aug 12, 2022
de795ff
chore(release): 4.0.0-theming-v2.10 [skip ci]
semantic-release-bot Aug 12, 2022
a085741
feat: Add CSS class to SVG images
szuperaz Aug 15, 2022
3aecb96
chore(release): 4.0.0-theming-v2.11 [skip ci]
semantic-release-bot Aug 15, 2022
f82db39
fix: Mention autocomplete in theme-v1
szuperaz Aug 23, 2022
b41faa1
chore(release): 4.0.0-theming-v2.12 [skip ci]
semantic-release-bot Aug 23, 2022
262ff78
feat: Update stream-chat-css
szuperaz Aug 24, 2022
a6dfaac
Merge branch 'master' into theming-v2
szuperaz Aug 24, 2022
f47654c
chore(release): 4.0.0-theming-v2.13 [skip ci]
semantic-release-bot Aug 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ on:
branches:
- master
- beta
- theming-v2
pull_request:
branches:
- master
- beta
- theming-v2
jobs:
test:
workflow:
runs-on: ubuntu-latest
strategy:
matrix:
Expand Down Expand Up @@ -55,6 +57,8 @@ jobs:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- name: Copy docs from stream-chat-css
run: npm run copy-css-docs
- name: Generate docs
run: |
npm run generate-docs
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ testem.log
temp-service-docs
temp-component-docs
docusaurus/docs/Angular/services/*.mdx
docusaurus/docs/Angular/theming/*
docusaurus/docs/Angular/assets/stream-chat-css*

# System Files
.DS_Store
Expand Down
20 changes: 20 additions & 0 deletions copy-css-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash

usage() {
echo "Missing path to stream-chat-css directory"
echo "Usage: $(basename $0) <path_to_stream-chat-css_directory>"
}

main() {
if [ $# -eq 0 ]; then
usage
exit 0
fi

STREAM_CHAT_CSS_DOCS_PATH=$1;
cp -r "$STREAM_CHAT_CSS_DOCS_PATH"/* ./docusaurus/docs/Angular;
}


main $*
exit 0
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/attachments-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/channel-header-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/channel-invites-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/emoji-picker-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/invite-button-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/invite-modal1-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/invite-modal2-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/message-reactions-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docusaurus/docs/Angular/assets/message-screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
48 changes: 48 additions & 0 deletions docusaurus/docs/Angular/basics/upgrade-v3.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
id: upgrade-v3
title: Upgrade from v3
---

## About version 4

Version 4 of stream-chat-angular brings a new and improved theming system. To use the new system please refer to our new [theming guide](../theming/introduction.mdx).

## Theme-v1

The old theme can still be used with the latest SDK versions however, you might need to update your custom CSS as some changes were introduced to theme-v1.

Updating from theme-v1 to theme-v2 will require to rewrite your custom CSS code as the new theme has a new variable system, and all the components were restructured.

Theme-v1 is now deprecated and will be removed in a future release.

## Theard layout

Previously you had to provide a selector for the message list and message input component projected inside the [thread component](../components/ThreadComponent.mdx).

```html
<stream-thread name="thread">
<stream-message-list
name="thread-message-list"
mode="thread"
></stream-message-list>
<stream-message-input
mode="thread"
name="thread-message-input"
></stream-message-input>
</stream-thread>
```

You don't need to provide those selectors anymore, anything inside the content part of `stream-thread` HTML element will be projected inside the thread component:

```html
<stream-thread name="thread">
<stream-message-list mode="thread"></stream-message-list>
<stream-message-input mode="thread"></stream-message-input>
</stream-thread>
```

Providing the selector won't cause a problem, but it's unnecessary.

## `device-width` module was removed

The `device-width` utility module was removed. If you rely on this code inside your chat application, you'll have to update your code.
2 changes: 1 addition & 1 deletion docusaurus/docs/Angular/code-examples/_category_.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"label": "Code examples",
"position": 6
"position": 8
}
22 changes: 13 additions & 9 deletions docusaurus/docs/Angular/code-examples/channel-invites.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ We create a simplistic UI with an "Invite users" button that opens a [modal](../

### Styling

We are using stream-chat theme variables to match the default chat theme. You can read more about theme variables in our [themeing guide](../concepts/themeing-and-css.mdx).
We are using stream-chat theme variables to match the default chat theme. You can read more about theme variables in our [theming guide](../theming/introduction.mdx).

```scss
.modal-content {
Expand All @@ -71,8 +71,13 @@ We are using stream-chat theme variables to match the default chat theme. You ca
width: 200px;
padding: 10px;
border: none;
border-radius: var(--border-radius-md);
background-color: var(--grey-whisper);
background-color: var(--str-chat__message-textarea-background-color);
color: var(--str-chat__message-textarea-color);
border-radius: var(--str-chat__message-textarea-border-radius);
border-block-start: var(--str-chat__message-textarea-border-block-start);
border-block-end: var(--str-chat__message-textarea-border-block-end);
border-inline-start: var(--str-chat__message-textarea-border-inline-start);
border-inline-end: var(--str-chat__message-textarea-border-inline-end);
}

.invited-users {
Expand All @@ -89,10 +94,10 @@ We are using stream-chat theme variables to match the default chat theme. You ca
}

button {
background-color: var(--primary-color);
background-color: var(--str-chat__cta-button-background-color);
border: none;
border-radius: var(--border-radius-md);
color: white;
border-radius: var(--str-chat__cta-button-border-radius);
color: var(--str-chat__cta-button-color);
padding: 10px;
cursor: pointer;
}
Expand Down Expand Up @@ -391,13 +396,12 @@ Add this to your `app.component.html` file:
Add a reference to the template in your `app.component.ts`:

```typescript
@ViewChild('inviteTemplate') private inviteTemplate!: TemplateRef<{
channel: Channel<DefaultStreamChatGenerics> | ChannelResponse<DefaultStreamChatGenerics>;
@ViewChild('inviteTemplate') private inviteTemplate!: TemplateRef<{channel: Channel<DefaultStreamChatGenerics> | ChannelResponse<DefaultStreamChatGenerics>}>;
```

#### Displaying the invitations

The `pendingInvites$` Observable on the [`ChatClientService`](../services/ChatClientService.mdx) can notify us about the pending invitations of the current user. Let's subscribe to this Observable and display the invites in the `ngOnInit` method of the `app.component.ts`
The `pendingInvites$` Observable on the [`ChatClientService`](../services/ChatClientService.mdx) can notify us about the pending invitations of the current user. Let's subscribe to this Observable and [display the invites](../services/NotificationService.mdx) in the `ngOnInit` method of the `app.component.ts`

```typescript
ngOnInit(): void {
Expand Down
168 changes: 122 additions & 46 deletions docusaurus/docs/Angular/code-examples/emoji-picker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,26 +65,52 @@ Your emoji picker component should have an input with the type `Subject<string>`

We also defined an `isOpened` property that tells if the emoji picker should be opened or closed.

The emoji picker will close on outside clicks.

```typescript
import { Component, Input, OnInit } from "@angular/core";
import { Subject } from "rxjs";
import { Component, ElementRef, Input, ViewChild } from "@angular/core";
import { Observable, Subject } from "rxjs";
import { ThemeService } from "stream-chat-angular";

@Component({
selector: "app-emoji-picker",
templateUrl: "./emoji-picker.component.html",
styleUrls: ["./emoji-picker.component.scss"],
})
export class EmojiPickerComponent implements OnInit {
export class EmojiPickerComponent {
isOpened = false;
theme$: Observable<string>;
@Input() emojiInput$: Subject<string> | undefined;
@ViewChild("container") container: ElementRef<HTMLElement> | undefined;

constructor() {}

ngOnInit(): void {}
constructor(themeService: ThemeService) {
this.theme$ = themeService.theme$;
}

emojiSelected(event: any) {
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
this.emojiInput$?.next(event.emoji.native);
}

eventHandler = (event: Event) => {
// Watching for outside clicks
if (!this.container?.nativeElement.contains(event.target as Node)) {
this.isOpened = false;
window.removeEventListener("click", this.eventHandler);
}
};

toggled() {
if (!this.container) {
return;
}
this.isOpened = !this.isOpened;
if (this.isOpened) {
window.addEventListener("click", this.eventHandler);
} else {
window.removeEventListener("click", this.eventHandler);
}
}
}
```

Expand All @@ -94,59 +120,81 @@ We create a button that can be used to toggle the emoji picker.

The [`emoji-mart`](https://www.npmjs.com/package/@ctrl/ngx-emoji-mart) component has a lot of configuration options, feel free to explore those.

We set the `color` input to the `primary-color` defined in the [stream-chat-css theme](https://github.com/GetStream/stream-chat-css/blob/develop/src/styles/_variables.scss).
We set the `color` input to `--str-chat__primary-color` defined in the [stream-chat-css theme](../theming/global-variables.mdx).

The [`ngIf`](https://angular.io/api/common/NgIf) directive is used to hide/show the emoji picker.

The `emojiSelect` event is fired when a user selects an emoji, we emit the selected emoji using the `emojiSelected` method.

```html
<button (click)="isOpened = !isOpened">
<svg
viewBox="0 0 28 28"
width="100%"
preserveAspectRatio="xMinYMin"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-rule="evenodd" fill-rule="evenodd">
<path
d="M14 4.4C8.6 4.4 4.4 8.6 4.4 14c0 5.4 4.2 9.6 9.6 9.6c5.4 0 9.6-4.2 9.6-9.6c0-5.4-4.2-9.6-9.6-9.6zM2 14c0-6.6 5.4-12 12-12s12 5.4 12 12s-5.4 12-12 12s-12-5.4-12-12zM12.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM18.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM8.6 15.4c.6-.4 1.2-.2 1.6.2c.6.8 1.6 1.8 3 2c1.2.4 2.8.2 4.8-2c.4-.4 1.2-.6 1.6 0c.4.4.6 1.2 0 1.6c-2.2 2.6-4.8 3.4-7 3c-2-.4-3.6-1.8-4.4-3c-.4-.6-.2-1.2.4-1.8z"
></path>
</g>
</svg>
</button>

<emoji-mart
class="picker"
color="var(--primary-color)"
*ngIf="isOpened"
title="Pick your emoji…"
emoji="point_up"
(emojiSelect)="emojiSelected($event)"
></emoji-mart>
<div #container class="emoji-picker-container">
<button (click)="toggled()">
<svg
viewBox="0 0 28 28"
width="100%"
preserveAspectRatio="xMinYMin"
xmlns="http://www.w3.org/2000/svg"
>
<g clip-rule="evenodd" fill-rule="evenodd">
<path
d="M14 4.4C8.6 4.4 4.4 8.6 4.4 14c0 5.4 4.2 9.6 9.6 9.6c5.4 0 9.6-4.2 9.6-9.6c0-5.4-4.2-9.6-9.6-9.6zM2 14c0-6.6 5.4-12 12-12s12 5.4 12 12s-5.4 12-12 12s-12-5.4-12-12zM12.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM18.8 11c0 1-.8 1.8-1.8 1.8s-1.8-.8-1.8-1.8s.8-1.8 1.8-1.8s1.8.8 1.8 1.8zM8.6 15.4c.6-.4 1.2-.2 1.6.2c.6.8 1.6 1.8 3 2c1.2.4 2.8.2 4.8-2c.4-.4 1.2-.6 1.6 0c.4.4.6 1.2 0 1.6c-2.2 2.6-4.8 3.4-7 3c-2-.4-3.6-1.8-4.4-3c-.4-.6-.2-1.2.4-1.8z"
></path>
</g>
</svg>
</button>

<emoji-mart
class="picker"
color="var(--str-chat__primary-color)"
*ngIf="isOpened"
title="Pick your emoji…"
emoji="point_up"
(emojiSelect)="emojiSelected($event)"
[darkMode]="(theme$ | async) === 'dark'"
></emoji-mart>
</div>
```

5. Component styles

```scss
button {
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
}
If you want to match the color of the emoji picker toggle button to the other tool buttons in the message input, you can use the `--str-chat__message-input-tools-color` to do that as defined in the [stream-chat-css theme](../theming/global-variables.mdx)

.picker {
position: absolute;
bottom: 100%;
left: 0;
transform: scale(0.8);
transform-origin: 0% 100%;
}
```scss
.emoji-picker-container {
position: relative;
width: 24px;
height: 24px;

button {
background-color: transparent;
border: none;
cursor: pointer;
padding: 0;
margin: 0;

svg {
width: 24px;
height: 24px;

path {
fill: var(--str-chat__message-input-tools-color);
}
}
}

@media only screen and (min-device-width: 1024px) {
.picker {
transform: scale(1);
z-index: 3;
position: absolute;
bottom: 100%;
transform: scale(0.8);
right: 0;
transform-origin: bottom right;
}

@media only screen and (min-device-width: 1024px) {
.picker {
transform: scale(1);
}
}
}
```
Expand Down Expand Up @@ -230,3 +278,31 @@ export class AppComponent implements AfterViewInit {
This is how our emoji picker looks like:

<img src={Screenshot} width="500" />

## Dark and light mode

If your application supports dark and light themes, here how you can toggle the theme on the emoji input component:

Add this to you emoji picker component class:

```typescript
theme$: Observable<string>;

constructor(themeService: ThemeService) {
this.theme$ = themeService.theme$;
}
```

And set the `darkMode` input on the `emoji-mart` component:

```html
<emoji-mart
class="picker"
color="var(--str-chat__primary-color)"
*ngIf="isOpened"
title="Pick your emoji…"
emoji="point_up"
(emojiSelect)="emojiSelected($event)"
[darkMode]="(theme$ | async) === 'dark'"
></emoji-mart>
```
Loading