Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 2 additions & 0 deletions src/styles/_color-themes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ $themes: (
bg--2-5: var(--sendbird-light-background-200),
bg--2-7: var(--sendbird-light-background-200),
bg--3-3: var(--sendbird-light-background-300),
bg--7-3: var(--sendbird-light-background-700),

primary--1-bg--7: var(--sendbird-light-primary-100),
secondary--3-2: var(--sendbird-light-secondary-300),
Expand Down Expand Up @@ -150,6 +151,7 @@ $themes: (
bg--2-5: var(--sendbird-dark-background-500),
bg--2-7: var(--sendbird-dark-background-700),
bg--3-3: var(--sendbird-dark-background-300),
bg--7-3: var(--sendbird-dark-background-300),

primary--1-bg--7: var(--sendbird-dark-background-700),
secondary--3-2: var(--sendbird-dark-secondary-200),
Expand Down
2 changes: 2 additions & 0 deletions src/ui/Icon/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ const Colors = {
CONTENT: 'CONTENT',
CONTENT_INVERSE: 'CONTENT_INVERSE',
WHITE: 'WHITE',
GRAY: 'GRAY',
SENT: 'SENT',
READ: 'READ',
ON_BACKGROUND_1: 'ON_BACKGROUND_1',
Expand All @@ -83,6 +84,7 @@ function changeColorToClassName(color) {
case Colors.CONTENT: return 'sendbird-icon-color--content';
case Colors.CONTENT_INVERSE: return 'sendbird-icon-color--content-inverse';
case Colors.WHITE: return 'sendbird-icon-color--white';
case Colors.GRAY: return 'sendbird-icon-color--gray';
case Colors.SENT: return 'sendbird-icon-color--sent';
case Colors.READ: return 'sendbird-icon-color--read';
case Colors.ON_BACKGROUND_1: return 'sendbird-icon-color--on-background-1';
Expand Down
4 changes: 4 additions & 0 deletions src/ui/Icon/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
fill: #ffffff;
}

.sendbird-icon-color--gray [class*='fill'] {
fill: rgba(0, 0, 0, 0.5);
}

.sendbird-icon-color--sent [class*='fill'] {
@include themed() {
fill: t(inverse-on-content-3);
Expand Down
8 changes: 5 additions & 3 deletions src/ui/ThumbnailMessageItemBody/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { ReactElement } from 'react';
import React, { ReactElement, useState } from 'react';
// import { FileMessage } from 'sendbird';
import { FileMessage } from '../../sendbird.min.js';
import './index.scss';
Expand All @@ -24,6 +24,7 @@ export default function ThumbnailMessageItemBody({
}: Props): ReactElement {
const { thumbnails = [] } = message;
const thumbnailUrl: string = thumbnails.length > 0 ? thumbnails[0]?.url : '';
const [imageRendered, setImageRendered] = useState(false);

return (
<div
Expand All @@ -42,6 +43,7 @@ export default function ThumbnailMessageItemBody({
alt={message?.type}
width="360px"
height="270px"
onLoad={() => { setImageRendered(true) }}
placeHolder={(style) => (
<div
className="sendbird-thumbnail-message-item-body__placeholder"
Expand All @@ -59,7 +61,7 @@ export default function ThumbnailMessageItemBody({
)}
/>
{
(isVideoMessage(message) && !thumbnailUrl) && (
(isVideoMessage(message) && !thumbnailUrl) && !imageRendered && (
<video className="sendbird-thumbnail-message-item-body__video">
<source src={message?.url} type={message?.type} />
</video>
Expand All @@ -72,7 +74,7 @@ export default function ThumbnailMessageItemBody({
<div className="sendbird-thumbnail-message-item-body__icon-wrapper__icon">
<Icon
type={isVideoMessage(message) ? IconTypes.PLAY : IconTypes.GIF}
fillColor={IconColors.ON_BACKGROUND_2}
fillColor={IconColors.GRAY}
width="34px"
height="34px"
/>
Expand Down
9 changes: 6 additions & 3 deletions src/ui/Tooltip/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
max-width: 200px;
border-radius: 8px;
padding: 8px 16px;
background-color: var(--sendbird-tooltip-background);
@include themed() {
background-color: t(bg--7-3);
}

&::after {
content: '';
Expand All @@ -16,7 +18,9 @@
width: 8px;
height: 8px;
transform: rotate(45deg);
background-color: var(--sendbird-tooltip-background);
@include themed() {
background-color: t(bg--7-3);
}
}

&__text {
Expand All @@ -27,6 +31,5 @@
font-style: normal;
line-height: 1.33;
letter-spacing: normal;
color: var(--sendbird-tooltip-text-color);
}
}