Class: Plutonium::UI::Display::Components::Boolean

Inherits:
Phlexi::Display::Components::Base
  • Object
show all
Includes:
Phlexi::Display::Components::Concerns::DisplaysValue
Defined in:
lib/plutonium/ui/display/components/boolean.rb

Instance Method Summary collapse

Instance Method Details

#render_value(value) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'lib/plutonium/ui/display/components/boolean.rb', line 10

def render_value(value)
  p(**attributes) do
    if value
      render Phlex::TablerIcons::Check.new(class: "inline-block w-5 h-5 text-green-600")
    else
      render Phlex::TablerIcons::X.new(class: "inline-block w-5 h-5 text-red-500")
    end
  end
end