Sha256: 849ab3e89bef2e54ade5f88680ab986d649c9f91e7ad713c81084ea7b6b0b9fa

Contents?: true

Size: 492 Bytes

Versions: 61

Compression:

Stored size: 492 Bytes

Contents

# frozen_string_literal: true

class Avo::ModalComponent < ViewComponent::Base
  renders_one :heading
  renders_one :controls

  attr_reader :width
  attr_reader :body_class

  def initialize(width: :md, body_class: nil)
    @width = width
    @body_class = body_class
  end

  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

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

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
avo-2.53.0 app/components/avo/modal_component.rb
avo-2.52.0 app/components/avo/modal_component.rb
avo-3.9.2 app/components/avo/modal_component.rb
avo-3.9.1 app/components/avo/modal_component.rb
avo-3.8.2 app/components/avo/modal_component.rb
avo-3.9.0 app/components/avo/modal_component.rb
avo-3.8.1 app/components/avo/modal_component.rb
avo-3.8.0 app/components/avo/modal_component.rb
avo-3.6.4 app/components/avo/modal_component.rb
avo-3.6.3 app/components/avo/modal_component.rb
avo-3.6.2 app/components/avo/modal_component.rb
avo-2.49.0 app/components/avo/modal_component.rb
avo-3.6.1 app/components/avo/modal_component.rb
avo-3.6.0 app/components/avo/modal_component.rb
avo-3.5.8 app/components/avo/modal_component.rb
avo-3.5.7 app/components/avo/modal_component.rb
avo-3.5.6 app/components/avo/modal_component.rb
avo-3.5.6.beta1 app/components/avo/modal_component.rb
avo-3.5.5 app/components/avo/modal_component.rb
avo-3.5.4 app/components/avo/modal_component.rb