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