summaryrefslogtreecommitdiff
path: root/lib/web/components/message_component.ex
blob: 7f9bac7d421a4c0526323bd7a66cbc3b5c67f7db (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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