app/demo/components/tooltips.pom
require_relative '../helpers/indented_grid'
Voom::Presenters.define(:tooltips) do
helpers Demo::Helpers::IndentedGrid
attach :top_nav
attach :component_drawer
page_title 'Tooltips'
indented_grid do
headline 'Avatars'
subheading 'Cards'
card do
media do
avatar 'img/demo/rx.png' do
tooltip "Ill be back", position: :right
end
end
end
card do
media do
avatar :person do
tooltip "Ill be back", position: :right
end
end
end
subheading 'Lists (**Help Wanted**)'
list do
line do
text 'Terminator2'
avatar 'img/demo/rx.png' do
tooltip "I'll be back - not working", position: :right
end
end
line do
text 'Terminator3'
avatar :person do
tooltip "I'll be back - not working", position: :right
end
end
end
headline 'Buttons'
button 'Button', type: :raised do
tooltip "Yo\nsmile" # position: :left
end
button 'Button' do
tooltip "Yo\nsmile", position: :bottom
end
button icon: :mood do
tooltip "Yo\nsmile", position: :top
end
headline 'Chips'
chipset do
chip 'Hover over me' do
tooltip 'I have this tip!'
end
end
headline 'Tables'
table selectable: true do
header do
column 'Material'
column 'Quantity' do
tooltip 'This is the quantity on hand.', position: :top
end
column 'Unit price'
end
row do
column 'Caulk' do
tooltip 'This fixes leaks', position: :right
end
column 99
column "$299"
end
end
headline 'Toggles'
radio_button do
tooltip 'select it'
end
icon_toggle :star_border, on_icon: :star do
tooltip 'toggle it - uses on and off icons'
end
switch do
tooltip 'switch it'
end
checkbox do
tooltip 'check it'
end
headline 'Styles', level: 3
headline 'Headline' do
tooltip 'I do nothing.'
end
title 'Title' do
tooltip 'I do nothing.'
end
subheading 'Subheading 2', level: 2 do
tooltip 'I do nothing.'
end
body 'Body 2 text, calling something out.', level: 2 do
tooltip 'I do nothing.'
end
attach :code, file: __FILE__
end
end