app/demo/components/selects.pom
require_relative '../helpers/indented_grid'
Voom::Presenters.define(:selects) do
helpers Demo::Helpers::IndentedGrid
attach :top_nav
attach :component_drawer
page_title 'Select Fields'
indented_grid do
content do
select full_width: false do
label 'Default (outlined) style ...'
option do
value 'value1'
text 'First value'
end
option do
value 'value2'
text 'Second value'
end
# event :change do
# snackbar 'item changed'
# end
end
blank
select outlined: false do
label 'Alternate style ...'
option
option selected: true do
value 'value1'
text 'First value'
end
option do
value 'value2'
text 'Second value'
end
# event :change do
# snackbar 'item changed'
# end
end
blank
select full_width: false do
icon :filter_list
label 'Default (outlined) style ...'
option disabled: true do
text 'Pick One'
end
option do
value 'value1'
text ' One value'
end
option do
value 'value2'
text ' Second value'
end
event :change do
snackbar 'item changed'
end
end
end
attach :code, file: __FILE__
end
end