Class: RubyUIAdmin::UI::ToastClose

Inherits:
Base
  • Object
show all
Defined in:
app/components/ruby_ui_admin/ui/toast_close.rb

Constant Summary

Constants inherited from Base

Base::TAILWIND_MERGER

Instance Attribute Summary

Attributes inherited from Base

#attrs

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from RubyUIAdmin::UI::Base

Instance Method Details

#view_templateObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'app/components/ruby_ui_admin/ui/toast_close.rb', line 7

def view_template
  button(**attrs) do
    svg(
      xmlns: "http://www.w3.org/2000/svg",
      width: "14",
      height: "14",
      viewbox: "0 0 24 24",
      fill: "none",
      stroke: "currentColor",
      stroke_width: "2",
      stroke_linecap: "round",
      stroke_linejoin: "round",
      class: "size-3.5"
    ) do |s|
      s.path(d: "M18 6 6 18")
      s.path(d: "m6 6 12 12")
    end
    span(class: "sr-only") { "Close" }
  end
end