summaryrefslogtreecommitdiff
path: root/lib/nola_web/components/message_component.ex
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2022-12-20 00:21:54 +0000
committerJordan Bracco <href@random.sh>2022-12-20 19:29:41 +0100
commit2d83df8b32bff7f0028923bb5b64dc0b55f20d03 (patch)
tree1207e67b5b15f540963db05e7be89f3ca950e724 /lib/nola_web/components/message_component.ex
parentNola rename, the end. pt 6. Refs T77. (diff)
Nola rename: The Big Move, Refs T77
Diffstat (limited to 'lib/nola_web/components/message_component.ex')
-rw-r--r--lib/nola_web/components/message_component.ex12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/nola_web/components/message_component.ex b/lib/nola_web/components/message_component.ex
new file mode 100644
index 0000000..5d0386b
--- /dev/null
+++ b/lib/nola_web/components/message_component.ex
@@ -0,0 +1,12 @@
+defmodule NolaWeb.MessageComponent do
+ use Phoenix.Component
+
+ def content(assigns) do
+ ~H"""
+ <NolaWeb.Component.naive_date_time_utc datetime={@message.at} format="time-24-with-seconds" />
+ <div class="inline-block font-bold flex-none cursor-default"><%= @message.sender.nick %></div>
+ <div class="inline-block flex-grow cursor-default"><%= @text %></div>
+ """
+ end
+
+end