Class: PhlexKit::CommandEmpty

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/command/command_empty.rb

Overview

"No results" row — hidden by the controller until a filter matches nothing. See command.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ CommandEmpty

Returns a new instance of CommandEmpty.



5
6
7
# File 'app/components/phlex_kit/command/command_empty.rb', line 5

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
# File 'app/components/phlex_kit/command/command_empty.rb', line 9

def view_template(&)
  div(**mix({
    class: "pk-command-empty",
    role: "presentation",
    data: { phlex_kit__command_target: "empty" }
  }, @attrs), &)
end