MishkaGervaz.Form.Entities.Submit.Button (MishkaGervaz v0.0.1-alpha.3)

Copy Markdown View Source

Single submit / cancel button configuration.

Each button (create / update / cancel) is an independent entity with its own label, active, disabled, restricted, and visible options. Every option except label accepts a boolean or a fn state -> boolean() end predicate.

The active option is intended for resources: setting active: false suppresses a button that would otherwise be inherited from the domain default — a per-button opt-out without re-declaring the entire submit block.

See MishkaGervaz.Form.Entities.Submit for the parent entity and MishkaGervaz.Form.Dsl.Submit for the DSL definition.

Summary

Types

t()

@type t() :: %MishkaGervaz.Form.Entities.Submit.Button{
  __spark_metadata__: map() | nil,
  active: boolean() | (map() -> boolean()),
  disabled: boolean() | (map() -> boolean()),
  label: String.t() | (-> String.t()) | nil,
  restricted: boolean() | (map() -> boolean()),
  visible: boolean() | (map() -> boolean())
}

Functions

transform(button)