Sha256: 26b7b499b6daff552c2da83d647addaa9e21dd6f3805ba33811360c58c286fcf
Contents?: true
Size: 419 Bytes
Versions: 1
Compression:
Stored size: 419 Bytes
Contents
class ModalComponent < ViewComponent::Base def initialize(attributes = {}) @name = attributes[:name] @show = attributes[:show] || false @max_width = { :sm => "sm:max-w-sm", :md => "sm:max-w-md", :lg => "sm:max-w-lg", :xl => "sm:max-w-xl", "2xl" => "sm:max-w-2xl" }[attributes[:max_width] || "2xl"] @attributes = attributes.without(:name, :show, :max_width) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kaze-0.4.0 | stubs/hotwire/app/components/modal_component.rb |