From 4addb7844bae51007acea9873a12d731cfb58af6 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 12 Dec 2018 16:33:32 +0300 Subject: Avatar styling --- vnext/src/components/Avatar.css | 21 +++++++++++++++++++++ vnext/src/components/Avatar.js | 4 +++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 vnext/src/components/Avatar.css diff --git a/vnext/src/components/Avatar.css b/vnext/src/components/Avatar.css new file mode 100644 index 00000000..d30686ed --- /dev/null +++ b/vnext/src/components/Avatar.css @@ -0,0 +1,21 @@ +.Avatar { + display: flex; + padding: 12px; + width: 100%; +} +.msg-avatar { + max-height: 48px; + margin-right: 10px; + max-width: 48px; +} +.msg-avatar img { + max-height: 48px; + vertical-align: top; + max-width: 48px; +} + +@media screen and (min-width: 450px) { + .Avatar { + width: 300px; + } +} \ No newline at end of file diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index e2023649..6ea0d5d5 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -6,9 +6,11 @@ import { UserType } from './Types'; import Icon from './Icon'; +import './Avatar.css'; + const Avatar = React.memo(props => { return ( -
+
{ props.user.uname ? -- cgit v1.2.3