Sha256: acc037a9dd1d1076c0d7928fd113253183ca9d94891e04bb477ebd1c6f393c5d

Contents?: true

Size: 1.78 KB

Versions: 6

Compression:

Stored size: 1.78 KB

Contents

module Voom
  module Presenters
    module DSL
      module Components
        module Mixins
          module Common
            include Mixins::Toggles
            include Mixins::Append
            include Mixins::Typography
            include Mixins::Grids
            include Mixins::Buttons
            include Mixins::ExpansionPanels
            include Mixins::Content
            include Mixins::Menus
            include Mixins::TabBars
            include Mixins::Images
            include Mixins::Icons
            include Mixins::ImageLists
            include Mixins::Dialogs
            include Mixins::Tables
            
            def badge(badge=nil, **attributes, &block)
              self << Components::Badge.new(parent: self, badge: badge, **attributes, &block)
            end

            def card(**attributes, &block)
              self << Components::Card.new(parent: self, **attributes, &block)
            end

            def form(id: nil, **attributes, &block)
              self << Components::Form.new(parent: self, id: id, **attributes, &block)
            end

            def list(**attributes, &block)
              self << Components::List.new(parent: self,
                                           **attributes, &block)
            end
            
            def table(**attributes, &block)
              self << Components::Table.new(parent: self, **attributes, &block)
            end

            def unordered_list(**attributes, &block)
              self << Components::UnorderedList.new(parent: self, **attributes, &block)
            end

            def avatar(avatar = nil, **attributes, &block)
              self << Components::Avatar.new(parent: self, avatar: avatar, **attributes, &block)
            end
          end
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 lib/voom/presenters/dsl/components/mixins/common.rb
voom-presenters-2.1.0 lib/voom/presenters/dsl/components/mixins/common.rb
voom-presenters-2.0.3 lib/voom/presenters/dsl/components/mixins/common.rb
voom-presenters-2.0.2 lib/voom/presenters/dsl/components/mixins/common.rb
voom-presenters-2.0.1 lib/voom/presenters/dsl/components/mixins/common.rb
voom-presenters-2.0.0 lib/voom/presenters/dsl/components/mixins/common.rb