Class: Avo::ModalComponent

Inherits:
BaseComponent show all
Defined in:
app/components/avo/modal_component.rb

Constant Summary

Constants included from Concerns::FindAssociationField

Concerns::FindAssociationField::ASSOCIATIONS

Instance Method Summary collapse

Methods inherited from BaseComponent

#has_with_trial

Methods included from Concerns::FindAssociationField

#find_association_field

Instance Method Details

#height_classesObject



20
21
22
# File 'app/components/avo/modal_component.rb', line 20

def height_classes
  "max-h-full min-h-1/4 max-h-11/12"
end

#overflow_classesObject



24
25
26
# File 'app/components/avo/modal_component.rb', line 24

def overflow_classes
  @overflow == :auto ? "overflow-auto" : ""
end

#width_classesObject



11
12
13
14
15
16
17
18
# File 'app/components/avo/modal_component.rb', line 11

def width_classes
  case @width.to_sym
  when :md
    "w-11/12 lg:w-1/2 sm:max-w-168"
  when :xl
    "w-11/12 lg:w-3/4"
  end
end