AshAuthentication.Phoenix.Components.Confirm.Input (ash_authentication_phoenix v2.10.1)

View Source

Function components for dealing with form input during password authentication.

Component hierarchy

These function components are consumed by AshAuthentication.Phoenix.Components.Password.SignInForm, AshAuthentication.Phoenix.Components.Password.RegisterForm and AshAuthentication.Phoenix.Components.ResetForm.

Overrides

This component provides the following overrides:

  • :submit_label - A function that takes the strategy and returns text for the confirm button, or a string.
  • :submit_class - CSS class for the form submit input element.

See AshAuthentication.Phoenix.Overrides for more information.

Summary

Functions

Generate an form submit button.

Functions

submit(assigns)

@spec submit(%{
  :socket => Phoenix.LiveView.Socket.t(),
  :form => AshPhoenix.Form.t(),
  optional(:submit_label) => String.t(),
  optional(:overrides) => [module()],
  optional(:gettext_fn) => {module(), atom()}
}) :: Phoenix.LiveView.Rendered.t() | no_return()

Generate an form submit button.

Props

  • socket - Phoenix LiveView socket. This is needed to be able to retrieve the correct CSS configuration. Required.
  • strategy - The configuration map as per AshAuthentication.authenticated_resources/1. Required.
  • form - An AshPhoenix.Form. Required.
  • submit_label - The text to show in the submit label. Generated from the configured action name (via Phoenix.Naming.humanize/1) if not supplied.
  • overrides - A list of override modules.
  • gettext_fn - Optional text translation function.