Method: Primer::OpenProject::DragHandle#initialize

Defined in:
app/components/primer/open_project/drag_handle.rb

#initialize(size: Primer::OpenProject::DragHandle::DEFAULT_SIZE, **system_arguments) ⇒ DragHandle

Returns a new instance of DragHandle.

Parameters:

  • system_arguments (Hash)

    <%= link_to_system_arguments_docs %>


15
16
17
18
19
20
21
22
23
24
25
# File 'app/components/primer/open_project/drag_handle.rb', line 15

def initialize(size: Primer::OpenProject::DragHandle::DEFAULT_SIZE, **system_arguments)
  @system_arguments = system_arguments
  @system_arguments[:tag] = "div"
  @system_arguments[:classes] =
    class_names(
      @system_arguments[:classes],
      "DragHandle"
    )

  @size = fetch_or_fallback(Primer::OpenProject::DragHandle::SIZE_OPTIONS, size, Primer::OpenProject::DragHandle::DEFAULT_SIZE)
end