Class: Para::Markup::Panel
Instance Attribute Summary
Attributes inherited from Component
#view
Instance Method Summary
collapse
Methods inherited from Component
#initialize
Instance Method Details
#body(options = {}, &block) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/para/markup/panel.rb', line 24
def body(options = {}, &block)
merge_class!(options, "panel-body")
content_tag(:div, options) do
capture { block.call }
end
end
|
#container(options = {}, &block) ⇒ Object
4
5
6
7
8
9
10
11
12
13
14
|
# File 'lib/para/markup/panel.rb', line 4
def container(options = {}, &block)
merge_class!(options, "panel")
if (type = options.fetch(:type, 'default'))
merge_class!(options, "panel-#{ type }")
end
content_tag(:div, options) do
capture { block.call(self) }
end
end
|
32
33
34
35
36
37
38
|
# File 'lib/para/markup/panel.rb', line 32
def (options = {}, &block)
merge_class!(options, "panel-footer")
content_tag(:div, options) do
capture { block.call }
end
end
|
16
17
18
19
20
21
22
|
# File 'lib/para/markup/panel.rb', line 16
def (options = {}, &block)
merge_class!(options, "panel-heading")
content_tag(:div, options) do
capture { block.call }
end
end
|