Class: Charming::Components::CommandPaletteModal
- Inherits:
-
Charming::Component
- Object
- View
- Charming::Component
- Charming::Components::CommandPaletteModal
- Defined in:
- lib/charming/presentation/components/command_palette_modal.rb
Overview
CommandPaletteModal wraps command palette content in the frameworkâs standard modal chrome.
Constant Summary collapse
- DEFAULT_TITLE =
"Command palette"- DEFAULT_HELP =
"Type to filter. Enter selects. Escape closes."- DEFAULT_WIDTH =
52
Instance Method Summary collapse
-
#initialize(content:, title: DEFAULT_TITLE, help: DEFAULT_HELP, width: DEFAULT_WIDTH, style: nil, theme: nil) ⇒ CommandPaletteModal
constructor
A new instance of CommandPaletteModal.
- #render ⇒ Object
Methods inherited from View
Constructor Details
#initialize(content:, title: DEFAULT_TITLE, help: DEFAULT_HELP, width: DEFAULT_WIDTH, style: nil, theme: nil) ⇒ CommandPaletteModal
Returns a new instance of CommandPaletteModal.
11 12 13 14 15 16 17 18 |
# File 'lib/charming/presentation/components/command_palette_modal.rb', line 11 def initialize(content:, title: DEFAULT_TITLE, help: DEFAULT_HELP, width: DEFAULT_WIDTH, style: nil, theme: nil) super(theme: theme) @content = content @title = title @help = help @width = width @style = style end |