rx/presenters

View on GitHub
app/demo/plugins/index.pom

Summary

Maintainability
Test Coverage
Voom::Presenters.define(:index, namespace: :plugins) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :plugin_drawer
  plugin :foo

  indented_grid do
    display 'Sample Plugin'
    body 'You can extend the presenters by writing a plugin.'
    body 'Plugins can fully extend and override built in presenter behavior.'
    blank
    icon 'fa-hand-point-left', position: :left
    subheading 'Select a plugin to get started'
    blank
    body 'The plugin generator is the easiest way to get started.'
    body 'presenters generate plugin <your plugin name>'
    blank
    body 'For a complete example checkout the sample '\
               '[foo_presenter_plugin](https://github.com/rx/foo_presenter_plugin).'
    foo(random_fact)
    button 'New Random Fact' do
      event :click do
        bar 'Showing new random fact!'
        snackbar last_response.data
      end
    end
  end
  attach :code, file: __FILE__
end