Use semantic HTML classes in table actions

Note the CSS could probably be improved to avoid duplication with other
button style definitions. However, that's fine because we're going to
change the style of the links soon.

For the same reason, I haven't bothered to style every single link the
way it was until now.
This commit is contained in:
Javi Martín
2020-07-01 19:09:22 +02:00
parent ccb7695056
commit 8c1140a1bf
32 changed files with 79 additions and 56 deletions

View File

@@ -22,7 +22,7 @@ class Admin::TableActionsComponent < ApplicationComponent
end
def edit_options
{ class: "button hollow" }.merge(options[:edit_options] || {})
{ class: "edit-link" }.merge(options[:edit_options] || {})
end
def destroy_text
@@ -36,7 +36,7 @@ class Admin::TableActionsComponent < ApplicationComponent
def destroy_options
{
method: :delete,
class: "button hollow alert",
class: "destroy-link",
data: { confirm: destroy_confirmation }
}.merge(options[:destroy_options] || {})
end