From 7e93e41edc71a9972167cc43c5ab7249daa515e0 Mon Sep 17 00:00:00 2001 From: mrfry Date: Tue, 1 Jun 2021 13:52:43 +0200 Subject: [PATCH] Chat file and img type msg fix --- src/defaultStyles.css | 1 - src/pages/chat.js | 8 +++++++- src/pages/chat.module.css | 4 ++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/defaultStyles.css b/src/defaultStyles.css index fd4b1a2..c6ec631 100644 --- a/src/defaultStyles.css +++ b/src/defaultStyles.css @@ -31,7 +31,6 @@ body { } img { - margin: 5px; max-width: 90%; } diff --git a/src/pages/chat.js b/src/pages/chat.js index 0136055..d908bf3 100644 --- a/src/pages/chat.js +++ b/src/pages/chat.js @@ -546,7 +546,13 @@ export default class Chat extends React.Component { ) } else if (type === 'file') { return ( - + {msg.split('/').slice(-1)} ) diff --git a/src/pages/chat.module.css b/src/pages/chat.module.css index 9efc398..a1a812a 100644 --- a/src/pages/chat.module.css +++ b/src/pages/chat.module.css @@ -145,11 +145,11 @@ justify-content: flex-end; } -.ownMsg > div { +.ownMsg > * { background-color: #99f; } -.partnerMsg > div { +.partnerMsg > * { background-color: var(--primary-color); }