Sha256: b33cf39c1fc2b1dfb608218c3c38ae30a43c309d0eaa8712a75d9b06ecaf4547
Contents?: true
Size: 1.74 KB
Versions: 6
Compression:
Stored size: 1.74 KB
Contents
module Voom module Presenters module DSL module Components module Lists class Actions < Base def initialize(actions, **attribs_, &block) @actions = actions super(type: :actions, **attribs_, &block) expand! end def icon(icon=nil, **attribs, &block) action = Lists::Action.new(parent: self) action.icon(icon, **attribs, &block) @actions << action end def menu(**attribs, &block) action = Lists::Action.new(parent: self) action.menu(**attribs, &block) @actions << action end def checkbox(**attribs, &block) action = Lists::Action.new(parent: self) action.checkbox(**attribs, &block) @actions << action end def radio_button(**attribs, &block) action = Lists::Action.new(parent: self) action.radio_button(**attribs, &block) @actions << action end def switch(**attribs, &block) action = Lists::Action.new(parent: self) action.switch(**attribs, &block) @actions << action end def icon_toggle(icon=nil, **attribs, &block) action = Lists::Action.new(parent: self) action.icon_toggle(icon, **attribs, &block) @actions << action end def button(text=nil, **attribs, &block) action = Lists::Action.new(parent: self) action.button(text, **attribs, &block) @actions << action end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems