<%= form_with model: @form, url: register_path do |form| %>
<%= render(InputLabelComponent.new({ for: "name", value: "Name" })) %> <%= render(TextInputComponent.new({ id: "name", class: "block mt-1 w-full", type: "text", name: "name", value: @form.name, required: true, autofocus: true, autocomplete: "name" })) %> <%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:name] })) %>
<%= render(InputLabelComponent.new({ for: "email", value: "Email" })) %> <%= render(TextInputComponent.new({ id: "email", class: "block mt-1 w-full", type: "email", name: "email", value: @form.email, required: true, autocomplete: "username" })) %> <%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:email] })) %>
<%= render(InputLabelComponent.new({ for: "password", value: "Password" })) %> <%= render(TextInputComponent.new({ id: "password", class: "block mt-1 w-full", type: "password", name: "password", required: true, autocomplete: "new-password" })) %> <%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password] })) %>
<%= render(InputLabelComponent.new({ for: "password_confirmation", value: "Confirm Password" })) %> <%= render(TextInputComponent.new({ id: "password_confirmation", class: "block mt-1 w-full", type: "password", name: "password_confirmation", required: true, autocomplete: "new-password" })) %> <%= render(InputErrorComponent.new({ class: "mt-2", message: @form.error_messages[:password_confirmation] })) %>
Already registered? <%= render(PrimaryButtonComponent.new({ class: "ms-4" })) do %> Register <% end %>
<% end %>