submit button and unifed usage colors
This commit is contained in:
@ -12,15 +12,22 @@ module Merged
|
||||
def green_button( text, url)
|
||||
button( text , url , "bg-green-500" )
|
||||
end
|
||||
|
||||
def submit_button(text)
|
||||
clazz = "bg-blue-500 " + button_classes
|
||||
content_tag(:button , class: clazz , type: :submit) do
|
||||
text
|
||||
end
|
||||
end
|
||||
|
||||
def button(text , url , color)
|
||||
claz = color + " ml-3 inline-block rounded-lg px-4 py-3 text-md font-medium text-white"
|
||||
link_to(url) do
|
||||
content_tag(:button , class: claz ) do
|
||||
content_tag(:button , class: color + " " + button_classes ) do
|
||||
text
|
||||
end
|
||||
end
|
||||
end
|
||||
def button_classes
|
||||
"ml-3 inline-block rounded-lg px-4 py-3 text-md font-medium text-white"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -1,5 +1,6 @@
|
||||
module Merged
|
||||
module ViewHelper
|
||||
include MergedHelper
|
||||
# section should be hash with at least 'template' key
|
||||
def find_template(section)
|
||||
"merged/view/" + section.template
|
||||
|
Reference in New Issue
Block a user