mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Add AdminTooltipComponent
I left the stimulus controller separated as it is generic enough
This commit is contained in:
11
app/components/admin_tooltip_component.rb
Normal file
11
app/components/admin_tooltip_component.rb
Normal file
@@ -0,0 +1,11 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class AdminTooltipComponent < ViewComponent::Base
|
||||
def initialize(text:, link_text:, placement: "top", link: "", link_class: "")
|
||||
@text = text
|
||||
@link_text = link_text
|
||||
@placement = placement
|
||||
@link = link
|
||||
@link_class = link_class
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user