Skip to content

Commit

Permalink
fix: ran surface format
Browse files Browse the repository at this point in the history
  • Loading branch information
theycallmehero committed Nov 8, 2021
1 parent 30bd541 commit 792dcce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
4 changes: 1 addition & 3 deletions lib/moon/components/error_tag.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ defmodule Moon.Components.ErrorTag do

def render(assigns) do
~F"""
<Surface.Components.Form.ErrorTag
field={@field && String.to_atom("#{@field}")}
/>
<Surface.Components.Form.ErrorTag field={@field && String.to_atom("#{@field}")} />
"""
end
end
23 changes: 4 additions & 19 deletions lib/moon_web/pages/tutorials/add_data_using_form.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,25 +83,10 @@ defmodule MoonWeb.Pages.Tutorials.AddDataUsingForm do
<:example>
<Form for={@user_changeset} change="update_user" submit="save_user" autocomplete="off">
<TopToDown>
<TextInput
label="Name"
field="name"
/>
<TextInput
label="Email"
field="email"
/>
<Select
label="Gender"
field="gender"
options={@gender_options}
prompt="Please select gender"
/>
<FileInput
conf={@uploads.file}
label="Upload your ID"
placeholder="Choose a document..."
/>
<TextInput label="Name" field="name" />
<TextInput label="Email" field="email" />
<Select label="Gender" field="gender" options={@gender_options} prompt="Please select gender" />
<FileInput conf={@uploads.file} label="Upload your ID" placeholder="Choose a document..." />
<Button variant="fill" type="submit" full_width>Save</Button>
<Button variant="outline" on_click="clear_form">Cancel</Button>
</TopToDown>
Expand Down

0 comments on commit 792dcce

Please sign in to comment.