rx/presenters

View on GitHub
app/demo/components/nav/menu.pom

Summary

Maintainability
Test Coverage
Voom::Presenters.define('component_menu') do
  helpers Voom::Presenters::Helpers::Inflector
  menu side: :left do
    %i(
      avatars
      badges
      buttons
      cards
      chips
      content
      date_fields
      datetime_fields
      dialogs
      drawers
      expansion_panels
      fabs
      fabs_mini
      file_inputs
      footers
      headers
      hidden_fields
      icons
      images
      image_lists
      layouts
      lists
      number_fields
      maps
      menus
      multi_selects
      progress
      selects
      sliders
      snackbar
      steppers
      tab_bars
      tables
      text_areas
      text_fields
      time_fields
      toggles
      tooltips
      unordered_lists
    ).sort.each do |comp|
      item titleize(comp) do
        event :click do
          loads comp
        end
      end
    end
  end
end