defmodule Phoenix.LiveEditable.Interface.Bootstrap5 do @moduledoc """ TBD """ alias Phoenix.LiveEditable.Interface require Phoenix.LiveEditable.Svg alias Phoenix.LiveEditable.Svg @behaviour Interface.Base @doc """ <%= live_edit(assigns, @register.name, type: "text", id: "name", on_submit: "rename") %> """ @impl Interface.Base def text_focus(label, opts) do target = if opts[:target], do: "phx-target='#{opts[:target]}'", else: "" change = "phx-change='#{opts[:on_change]}'" submit = "phx-submit='#{opts[:on_submit]}'" """
""" end @doc """ <%= live_edit(assigns, @register.name, type: "text", id: "name", on_submit: "rename") %> """ @impl Interface.Base def text_anchor(label, _opts) do # target = if opts[:target], do: "phx-target='#{opts[:target]}'", else: "" # change = "phx-change='#{opts[:on_change]}'" # submit = "phx-submit='#{opts[:on_submit]}'" """ <#{ label } """ end @doc """ Options is a list of tuples {