app/demo/components/menus.pom
require_relative '../helpers/indented_grid'
Voom::Presenters.define(:menus) do
helpers Demo::Helpers::IndentedGrid
attach :top_nav
attach :component_drawer
page_title 'Menus'
dialog id: :hello_world do
title "Hello World!"
actions do
button 'Close'
end
end
indented_grid do
grid do
column 1
column 5 do
card height: '300px' do
button icon: :more_vert do
menu id: :dialog_test do
item 'Some Dialog Action' do
event :click do
dialog :hello_world
end
end
item 'Another Action'
divider
item 'Disabled Action', disabled: true
item 'Yet Another Action'
end
end
end
end
column 5 do
card height: '300px' do
button icon: :more_vert, position: :right do
menu do
item 'Some Action'
item 'Another Action'
divider
item 'Disabled Action', disabled: true
item 'Yet Another Action'
end
end
end
end
end
attach :code, file: __FILE__
end
end