rx/presenters

View on GitHub
app/demo/components/buttons.pom

Summary

Maintainability
Test Coverage
require_relative '../helpers/indented_grid'

Voom::Presenters.define(:buttons) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :component_drawer
  page_title 'Buttons'

  indented_grid do

    
    # Raised buttons
    headline 'Raised Button'
    button 'Button', type: :raised

    subheading 'Disabled'
    button 'Button', type: :raised, disabled: true

    subheading ' Accent colored'
    button 'Button', type: :raised, color: :secondary

    headline 'Flat button'
    button 'Button'

    subheading 'Disabled'
    button 'Button', type: :flat, disabled: true

    subheading 'Accent colored flat'
    button 'Button', type: :flat, color: :secondary

    subheading 'Aligned'
    grid do
      column 3 do
        button 'Not Aligned'
        button 'Right', position: :right
        button 'Left', position: :left
      end
    end

    # Icon Buttons
    headline 'Icon button'
    button icon: :mood
    subheading 'Colored'
    button icon: :mood, color: :primary
    button icon: :mood, color: :secondary

    subheading 'with text'
    button "I'm happy", icon: :mood

    headline 'Image button'
    button type: :image do
      image 'http://geotix.com/application/files/3514/5564/7308/MyNorthTicketsLogo.png'
    end

    subheading 'with icon'
    button type: :image do
      image 'http://geotix.com/application/files/3514/5564/7308/MyNorthTicketsLogo.png'
      icon :link
    end

    attach :code, file: __FILE__
  end
end