10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'app/concepts/matestack/ui/bootstrap/components/button.rb', line 10
def response
if bs_btn_transition.present? && bs_btn_transition.is_a?(Hash)
transition button_attributes.merge(bs_btn_transition.merge({attributes: { role: "button"} })) do
inner_response
end
elsif bs_btn_action.present? && bs_btn_action.is_a?(Hash)
action button_attributes.merge(bs_btn_action.merge({attributes: { role: "button"} })) do
inner_response
end
elsif bs_btn_onclick.present? && bs_btn_onclick.is_a?(Hash)
onclick button_attributes.merge(bs_btn_onclick.merge({attributes: { role: "button"} })) do
inner_response
end
elsif bs_btn_link.present? && bs_btn_link.is_a?(Hash)
link button_attributes.merge(bs_btn_link.merge({attributes: { role: "button"} })) do
inner_response
end
else
button_response
end
end
|