LedgerUI.Component (LedgerUI v0.2.0)

Copy Markdown View Source

Boilerplate for a Ledger UI component module.

defmodule LedgerUI.Components.Button do
  @moduledoc "..."
  use LedgerUI.Component

  attr :class, :any, default: nil
  def button(assigns), do: ~H"..."
end

Brings in Phoenix.Component (with global_prefixes: ["keep-"], so the LiveView patch markers keep-hidden, keep-class, keep-style, keep-data-* pass through :global), the JS alias, LedgerUI.Helpers (cx/1, ...) and LedgerUI.Components.Icon (<.icon>).