Sha256: e72ee6482b1d23e47b22a0fa489737443f9c8ad8d81776912494622f651aa90b
Contents?: true
Size: 519 Bytes
Versions: 2
Compression:
Stored size: 519 Bytes
Contents
class DropdownComponent < ViewComponent::Base renders_one :trigger def initialize(align: "right", width: "48", content_classes: "py-1 bg-white dark:bg-gray-700") if align == "left" @alignment_classes = "ltr:origin-top-left rtl:origin-top-right start-0" elsif align == "top" @alignment_classes = "origin-top" else @alignment_classes = "ltr:origin-top-right rtl:origin-top-left end-0" end @width = width == "48" ? "w-48" : width @content_classes = content_classes end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kaze-0.4.0 | stubs/hotwire/app/components/dropdown_component.rb |
kaze-0.3.0 | stubs/hotwire/app/components/dropdown_component.rb |