aboutsummaryrefslogtreecommitdiff
path: root/vnext/src
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-12-12 16:33:32 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:54 +0300
commit4addb7844bae51007acea9873a12d731cfb58af6 (patch)
treefbddd9bd84532c62aebc95c71dd227f752caa9eb /vnext/src
parente7b32a80cdcf0fa9ca97c14cda33db6d81b451d6 (diff)
Avatar styling
Diffstat (limited to 'vnext/src')
-rw-r--r--vnext/src/components/Avatar.css21
-rw-r--r--vnext/src/components/Avatar.js4
2 files changed, 24 insertions, 1 deletions
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 (
- <div style={Object.assign({ display: 'flex', padding: '12px', width: '300px' }, props.style)}>
+ <div className="Avatar" style={props.style}>
<div className="msg-avatar">
{
props.user.uname ?