defmodule CvGenView.Text do use Phoenix.Component use CvGen.RegenerateOnCompilation attr(:text, :any, required: true) attr(:rest, :global) def text(assigns) when is_binary(assigns.text), do: ~H"""

<%= @text %>

""" def text(assigns) when is_list(assigns.text), do: ~H""" <%= for paragraph <- @text do %>

<%= paragraph %>

<% end %> """ end