rx/presenters

View on GitHub
app/demo/events.pom

Summary

Maintainability
Test Coverage
Voom::Presenters.define(:events) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :events_drawer

  indented_grid do
    heading 'Events'
    body 'Events are able to be attached to most components. ',
         'Common examples include `click` and `change` events. ',
         'Events have actions.',
         "To see how an individual component handles events, visit the [component page](#{presenters_path(:components)})"

    icon 'fa-hand-point-left', position: :left
    subheading 'Select an event action'
    body ' '
    title "Event Action Error Handling"
    body 'Errors are automatically displayed in the following locations.',
         '1. Field/input level errors will display on the field/input.',
         '1. At the top of all forms.',
         '1. At the top of all dialogs.',
         '1. At the top of all cards.',
         '1. At the top of content blocks if they turn on show_errors.',
         '1. At the top of the page', level: 2

    body 'The closest error element will be used.'\
               'If you want to control where errors appear. Use the attribute `show_errors=(true|false)`'
  end
  attach :code, file: __FILE__
end