defmodule Moon.Parts.Wizard.Buttons do @moduledoc false use Moon.StatelessComponent alias Moon.Parts.Button alias Moon.Parts.Wizard @doc "Id attribute for DOM element" prop(id, :string) @doc "Additional Tailwind classes for container" prop(class, :css_class) @doc "Data-testid attribute for DOM element" prop(testid, :string) @doc "On save event, button is appeared if set & wizard is completed" prop(on_save, :event) @doc "Next button click event" prop(on_next, :event, from_context: :on_next) @doc "Previous button click event" prop(on_prev, :event, from_context: :on_prev) @doc "Cancel button click event, button is appeared if set" prop(on_cancel, :event) @doc "Values for a button to be sent on server by those events" prop(values, :map, from_context: :button_values) @doc "Additional buttons etc." slot(default) def render(assigns) do ~F"""