Sha256: 90b5f20b14e36cababe608528c6bac9129c5c157d2d92ba1fbaa688995080a2a

Contents?: true

Size: 1.29 KB

Versions: 12

Compression:

Stored size: 1.29 KB

Contents

require_relative '../helpers/indented_grid'

Coprl::Presenters.define(:tab_bars) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :component_drawer
  page_title 'Tab Bars'

  indented_grid do

    title 'Standard Tab Bar'
    tab_bar do
      tab 'One', selected: true
      tab 'Two'
      tab 'Three'
    end
    separator

    title 'Tabs with icons next to labels'
    tab_bar do
      tab 'One', icon: :thumb_up
      tab 'Two', icon: :face, selected: true
      tab 'Three', icon: :thumb_down
    end
    separator

    title 'Tabs with icons above labels'
    tab_bar do
      tab 'One', icon: :thumb_up, stacked: true, selected: true
      tab 'Two', icon: :face, stacked: true
      tab 'Three', icon: :thumb_down, stacked: true
    end
    separator

    title 'Scrolling Tabs'
    tab_bar do
      15.times do |idx|
        tab "Tab Number-#{idx}", selected: idx == 3 do
          event :click do
            snackbar 'tab clicked'
          end
        end
      end
    end
    separator

    title 'Content is automatically displayed/hidden'
    tab_bar do
      tab 'One', selected: true do
        heading3 'Tab 1'
      end
      tab 'Two' do
        heading3 'Tab 2'
      end
      tab 'Three' do
        heading3 'Tab 3'
      end
    end

  end

  attach :code, file: __FILE__
end



Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
coprl-3.0.0.beta.12 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.11 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.10 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.9 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.8 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.7 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.6 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.5 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.4 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.3 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.2 app/demo/components/tab_bars.pom
coprl-3.0.0.beta.1 app/demo/components/tab_bars.pom