move submit button from code to tailwind

This commit is contained in:
2023-01-21 19:11:21 +02:00
parent af58e885d7
commit 84fef50e16
10 changed files with 76 additions and 29 deletions

View File

@ -23,14 +23,6 @@ module Merged
def green_button( text, url)
button( text , url , "bg-green-200" )
end
def submit_button(text , danger = false )
clazz = "bg-cyan-200 " #full names, no tricks for tailwind
clazz = "bg-red-300 " if danger
clazz += button_classes
content_tag(:button , class: clazz , type: :submit) do
text
end
end
def button(text , url , color)
link_to(url) do
content_tag(:button , class: color + " " + button_classes ) do