module Lookbook

def add_panel(name, partial_path, opts = {})

Options Hash: (**opts)
  • :locals (Hash) -- A hash of local variables that will be passed to the panel when it is rendered
  • :copy (String) -- If present, the panel will display a copy button that copies the value of this property to the clipboard when clicked
  • :disabled (Boolean) -- Disabled tabs are still accessible but are greyed out in the UI
  • :hotkey (String) -- [Keyboard shortcut](https://alpinejs.dev/directives/on#keyboard-events) used to switch to the panel
  • :label (String) -- The text to be displayed in the panel tab

Parameters:
  • opts (Hash) -- Set of panel options
  • partial_path (String) -- Path to the partial template used to render the panel
  • name (Symbol, String) -- Unique panel name

Other tags:
    Example: :ruby -
def add_panel(name, partial_path, opts = {})
  Engine.panels.add_panel(name, partial_path, opts)
end