Class: Irelia::Modal::Component

Inherits:
Component
  • Object
show all
Defined in:
app/components/irelia/modal/component.rb

Defined Under Namespace

Classes: ToggleButton

Instance Method Summary collapse

Methods inherited from Component

#add_css_classes, after_initialize, #html_options, inherited, #initialize, run_after_initialize_hooks

Constructor Details

This class inherits a constructor from Irelia::Component

Instance Method Details

#before_renderObject



17
18
19
# File 'app/components/irelia/modal/component.rb', line 17

def before_render
  raise "Missing button component" if content && button.nil?
end

#variantsObject



9
10
11
12
13
14
15
# File 'app/components/irelia/modal/component.rb', line 9

def variants
  class_names(
    "irelia-modal",
    "irelia-modal--default": variant == :default,
    "irelia-modal--with-title": title.present?
  )
end