Class: Maglev::Uikit::SectionToolbar::BottomComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/maglev/uikit/section_toolbar/bottom_component.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

#button_class_names

Constructor Details

#initialize(paths:, options:) ⇒ BottomComponent

Returns a new instance of BottomComponent.



9
10
11
12
# File 'app/components/maglev/uikit/section_toolbar/bottom_component.rb', line 9

def initialize(paths:, options:)
  @paths = paths
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'app/components/maglev/uikit/section_toolbar/bottom_component.rb', line 7

def options
  @options
end

#pathsObject (readonly)

Returns the value of attribute paths.



7
8
9
# File 'app/components/maglev/uikit/section_toolbar/bottom_component.rb', line 7

def paths
  @paths
end

Instance Method Details

#button_classesObject



18
19
20
21
22
23
# File 'app/components/maglev/uikit/section_toolbar/bottom_component.rb', line 18

def button_classes
  %(bg-editor-primary pointer-events-auto cursor-pointer
    flex items-center justify-center h-8 w-8 rounded-full
    text-white/75 hover:text-white relative top-4
  )
end

#insert_button?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/components/maglev/uikit/section_toolbar/bottom_component.rb', line 14

def insert_button?
  options[:insert_button].nil? || !!options[:insert_button]
end