diff --git a/frontend/src/app/page.module.scss b/frontend/src/app/page.module.scss index fe3df8d..133e4bd 100644 --- a/frontend/src/app/page.module.scss +++ b/frontend/src/app/page.module.scss @@ -1,3 +1,4 @@ .messageList { + margin-top: 10px; overflow: auto; } diff --git a/frontend/src/components/Bubble/Bubble.module.scss b/frontend/src/components/Bubble/Bubble.module.scss index 18e0a90..0ed2f5d 100644 --- a/frontend/src/components/Bubble/Bubble.module.scss +++ b/frontend/src/components/Bubble/Bubble.module.scss @@ -6,6 +6,65 @@ color: #969696; } +.bubble { + width: 100%; + margin: 8px 0; + overflow: hidden; +} + +.bubble .chat { + width: 100%; + text-align: left; +} + +.userData { + text-align: left; +} + +.message, +.myMessage { + position: relative; + display: inline-block; + max-width: 250px; + padding: 10px 12px; + border-radius: 25px; + P { + padding: 0; + margin: 0; + font-size: 18px; + overflow-wrap: break-word; + } +} + .message { - overflow-wrap: break-word; + margin: 0 0 0 10px; + background: var(--bubble-color); + &:after { + position: absolute; + top: 3px; + left: -19px; + display: inline-block; + content: ""; + border: 8px solid transparent; + border-right: 18px solid var(--bubble-color); + -webkit-transform: rotate(35deg); + transform: rotate(35deg); + } +} + +.myMessage { + float: right; + max-width: 250px; + margin: 0 10px 0 10px; + background: var(--my-bubble-color); + p:after { + position: absolute; + top: 3px; + right: -19px; + content: ""; + border: 8px solid transparent; + border-left: 18px solid var(--my-bubble-color); + -webkit-transform: rotate(-35deg); + transform: rotate(-35deg); + } } diff --git a/frontend/src/components/Bubble/Bubble.tsx b/frontend/src/components/Bubble/Bubble.tsx index d012940..39e7f0b 100644 --- a/frontend/src/components/Bubble/Bubble.tsx +++ b/frontend/src/components/Bubble/Bubble.tsx @@ -8,11 +8,40 @@ export default function Bubble({ bubble: messageDownEventInterface; }) { return ( -
- {bubble.name} - - #{bubble.addressHash.slice(0, 4)} - : {bubble.message} -
+{bubble.message}
+{bubble.message}
+