summaryrefslogtreecommitdiff
path: root/lib/web/components/message_component.ex
diff options
context:
space:
mode:
authorJordan Bracco <href@random.sh>2022-12-20 02:19:42 +0000
committerJordan Bracco <href@random.sh>2022-12-20 19:29:41 +0100
commit9958e90eb5eb5a2cc171c40860745e95a96bd429 (patch)
treeb49cdb1d0041b9c0a81a14950d38c0203896f527 /lib/web/components/message_component.ex
parentRename to Nola (diff)
Actually do not prefix folders with nola_ refs T77
Diffstat (limited to 'lib/web/components/message_component.ex')
-rw-r--r--lib/web/components/message_component.ex12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/web/components/message_component.ex b/lib/web/components/message_component.ex
new file mode 100644
index 0000000..5d0386b
--- /dev/null
+++ b/lib/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