aboutsummaryrefslogtreecommitdiff
path: root/src/components/MessageBubble.js
diff options
context:
space:
mode:
authorYasutake Yohei <yohei@yasutakeyohei.com>2023-12-30 22:24:55 +0900
committerYasutake Yohei <yohei@yasutakeyohei.com>2023-12-30 22:24:55 +0900
commit3fc0ee1b72c12922254533b78695ffa17e7232be (patch)
treef92d871e6720670f3fa98d9e28b9396a894d9135 /src/components/MessageBubble.js
parente18d8441d03746158a72029381d8fbdee39184b3 (diff)
initial commit
Diffstat (limited to 'src/components/MessageBubble.js')
-rw-r--r--src/components/MessageBubble.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/components/MessageBubble.js b/src/components/MessageBubble.js
new file mode 100644
index 00000000..d64cf6ed
--- /dev/null
+++ b/src/components/MessageBubble.js
@@ -0,0 +1,11 @@
+import React from 'react';
+import styles from './MessageBubble.module.css';
+
+export default function MessageBubble({children, speaker, align, id}) {
+ let className = ("left" === align) ? [styles.bln, styles.bleft].join(' ') : [styles.bln, styles.bright].join(' ');
+ return (
+ <div className={className} data-speaker={speaker} id={id}>
+ {children}
+ </div>
+ );
+} \ No newline at end of file