Class: PhlexKit::CommandSeparator

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

Overview

Hairline between CommandGroups, ported from shadcn/ui's CommandSeparator. Hidden while a filter query is active (like cmdk). See command.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ CommandSeparator

Returns a new instance of CommandSeparator.



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

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

Instance Method Details

#view_templateObject



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

def view_template
  div(**mix({
    class: "pk-command-separator",
    role: "separator",
    aria: { hidden: true },
    data: { phlex_kit__command_target: "separator" }
  }, @attrs))
end