defmodule MoonWeb.Components.Facing.CardArticle do @moduledoc false use MoonWeb, :stateless_component prop(variant, :string, values: ["default", "tall", "wide"], default: "default") prop(href, :string) slot(title) slot(section) slot(author) def render(assigns) do ~F"""
  • <#slot {@section} />

    <#slot {@author} />

    <#slot {@title} />

  • """ end defp get_class(variant) do case variant do "tall" -> "md:w-72 md:h-[28rem] md:pe-9" "wide" -> "md:w-[28rem] md:h-72 md:pe-12" _ -> "md:w-96 md:h-72 md:pe-12" end end end