Sha256: 03fafab5a58ea2c15a6e5d6826e5de72df47f1319c4b38e55fba7a5d274ea17a
Contents?: true
Size: 419 Bytes
Versions: 13
Compression:
Stored size: 419 Bytes
Contents
module Coco class OptionBar < Coco::Component include Concerns::AcceptsOptions accepts_option :size, from: [:xs, :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
13 entries across 13 versions & 1 rubygems