Sha256: 86f2f0a6d602d1246dd13cd9019c6b22f0e7d03536ad9ac01c805fe2e1957681

Contents?: true

Size: 1.63 KB

Versions: 6

Compression:

Stored size: 1.63 KB

Contents

require_relative '../helpers/indented_grid'

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

  indented_grid do
    body <<~DOC
      Linear Progress bars have special placement and event handling behavior.     

      They automatically show themselves when an posts/updates/deletes action starts and hide themselves when an it finishes. 

      All you need to do is place your progress bars where you want them. (You can have more than one.)

      The following components allow progress bars:  `cards`, `content`, `dialog`, and `grid or column`.

      You can position them on top and/or on the bottom using `position: :top|:bottom|:both`
    DOC
    title 'Card'
    card do
      progress
      text 'card progress'
    end

    title 'Content'
    content do
      text 'content progress - top and bottom'
      progress position: :both
    end

    title 'Dialog'
    dialog id: :progress_dlg do
      text 'dialog progress - bottom'
      progress position: :bottom
      actions do
        button :start do
          event :click do
            posts '/_slow_', seconds: 5
            snackbar 'done'
          end
        end
      end
    end
    button :open do
      event :click do
        dialog :progress_dlg
      end
    end

    title 'Grid'
    grid do
      progress
      column 6 do
        progress position: :bottom
        text 'column progress bottom'
      end
    end

    button :start do
      event :click do
        posts '/_slow_', seconds: 5
        snackbar 'done'
      end
    end


    attach :code, file: __FILE__
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
voom-presenters-2.1.2 app/demo/components/progress.pom
voom-presenters-2.1.0 app/demo/components/progress.pom
voom-presenters-2.0.3 app/demo/components/progress.pom
voom-presenters-2.0.2 app/demo/components/progress.pom
voom-presenters-2.0.1 app/demo/components/progress.pom
voom-presenters-2.0.0 app/demo/components/progress.pom