Sha256: 0dbc46ba6eff9938c471dced516b3c85cb755d5c12fcd74c1af4f0e983ebe369
Contents?: true
Size: 414 Bytes
Versions: 12
Compression:
Stored size: 414 Bytes
Contents
module Coco class OptionBar < Coco::Component include Concerns::AcceptsOptions accepts_option :size, from: [:sm, :md], default: :sm renders_many :options, ->(*args, selected: false, **kwargs, &block) do theme = selected ? :neutral_light : :blank size = get_option_value(:size) coco_button(*args, **kwargs, theme:, size:, class: ("selected" if selected), &block) end end end
Version data entries
12 entries across 12 versions & 1 rubygems