mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user