DEV: Allow specifying button class in reviewable action definitions (#8093)

This avoids the need for using `@extend` in SCSS, which can be problematic in plugins

For context, see https://review.discourse.org/t/fix-make-compatible-with-debundled-plugin-css-assets-feature/5297/7
This commit is contained in:
David Taylor
2019-09-18 11:28:59 +01:00
committed by GitHub
parent 1ca257be79
commit 479fdaaea1
7 changed files with 14 additions and 10 deletions

View File

@ -33,11 +33,11 @@ class Reviewable < ActiveRecord::Base
end
class Action < Item
attr_accessor :icon, :label, :description, :confirm_message, :client_action
attr_accessor :icon, :button_class, :label, :description, :confirm_message, :client_action
def initialize(id, icon = nil, label = nil)
def initialize(id, icon = nil, button_class = nil, label = nil)
super(id)
@icon, @label = icon, label
@icon, @button_class, @label = icon, button_class, label
end
end