diff --git a/lib/ambry_web/components/admin/components.ex b/lib/ambry_web/components/admin/components.ex index df35ca9b..8a717b84 100644 --- a/lib/ambry_web/components/admin/components.ex +++ b/lib/ambry_web/components/admin/components.ex @@ -3,7 +3,6 @@ defmodule AmbryWeb.Admin.Components do use AmbryWeb, :html - alias Phoenix.HTML.Form alias Phoenix.HTML.FormField def admin_table_header(assigns) do @@ -230,49 +229,56 @@ defmodule AmbryWeb.Admin.Components do """ end - attr :drop_param, :atom, required: true - attr :parent_form, Form, required: true - attr :form, Form, required: true - attr :class, :string, default: nil, doc: "class overrides" + attr :field, FormField, required: true - def delete_button(assigns) do + def delete_input(assigns) do ~H""" - + "[]"} /> """ end - attr :drop_param, :atom, required: true - attr :form, Form, required: true + attr :field, FormField, required: true + attr :index, :integer, required: true - def delete_input(assigns) do + def sort_input(assigns) do ~H""" - "[]"} /> + "[]"} value={@index} /> """ end - attr :sort_param, :atom, required: true - attr :parent_form, Form, required: true - attr :form, Form, required: true + attr :field, FormField, required: true + attr :index, :integer, required: true + attr :class, :string, default: nil, doc: "class overrides" - def sort_input(assigns) do + def delete_button(assigns) do ~H""" - "[]"} value={@form.index} /> + """ end - attr :sort_param, :atom, required: true - attr :form, Form, required: true - attr :label, :string, required: true + attr :field, FormField, required: true + slot :inner_block, required: true def add_button(assigns) do ~H""" -