class Lookbook::TextButton::Component
def alpine_component
def alpine_component "buttonComponent" end
def icon_size
def icon_size ICON_SIZES[size] end
def id
def id @id ||= Utils.temp_id(prefix: "button") end
def initialize(id: nil, icon: nil, tooltip: nil, disabled: false, size: :md, href: nil, **html_attrs)
def initialize(id: nil, icon: nil, tooltip: nil, disabled: false, size: :md, href: nil, **html_attrs) @id = id @icon = icon @tooltip = tooltip @disabled = disabled @size = size @href = href super(**html_attrs) end
def tag_name
def tag_name href.present? ? :a : :button end