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



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

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

#overflow_classesObject



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

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

#width_classesObject



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

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