Sha256: 28e7c9a2c04c38355602934d51d0e760b6e34065dc566edb002803f2b590879e
Contents?: true
Size: 693 Bytes
Versions: 5
Compression:
Stored size: 693 Bytes
Contents
module Coco module App class PlanPicker < Coco::Component include Concerns::AcceptsOptions accepts_option :slider, from: [true, false], default: false renders_one :currency_selector, "Coco::OptionBar" renders_one :interval_selector, "Coco::OptionBar" renders_one :view_toggle, ->(*args, **kwargs, &block) do coco_button(*args, icon: :award, theme: :secondary, size: :md, **kwargs, &block) end renders_many :plans, ->(**kwargs, &block) do if kwargs.any? Coco::App::PlanCard.new(**kwargs) else block.call end end def slider? = get_option_value(:slider) == true end end end
Version data entries
5 entries across 5 versions & 1 rubygems