Class: Maglev::Uikit::SectionToolbar::TopRightCornerComponent

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

#button_class_names

Constructor Details

#initialize(id:, paths:, options:) ⇒ TopRightCornerComponent

Returns a new instance of TopRightCornerComponent.



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

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

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



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

def id
  @id
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'app/components/maglev/uikit/section_toolbar/top_right_corner_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/top_right_corner_component.rb', line 7

def paths
  @paths
end

Instance Method Details

#blocks?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'app/components/maglev/uikit/section_toolbar/top_right_corner_component.rb', line 15

def blocks?
  !!options[:has_blocks]
end

#button_classesObject



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

def button_classes
  %(relative bg-white z-50 rounded-full shadow-xl h-8 w-8
    flex items-center justify-center
    text-gray-700 pointer-events-auto hover:text-black cursor-pointer
  )
end