Skip to content

Commit

Permalink
add comment explaining how to use PopoverComponent
Browse files Browse the repository at this point in the history
  • Loading branch information
peetucket committed Jul 10, 2023
1 parent 2ab6d9b commit 8aa8e33
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/components/popover_component.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# frozen_string_literal: true

# Draws a bootstrap popover icon.
# When rendering the PopoverComponent, add a "aria-describedby" attribute to
# the element described by the popover with a value of "popover-KEY",
# where KEY is the value of the key passed to the PopoverComponent, e.g.:
# <legend aria-describedby="popover-collection.depositors">Depositors</legend>
# <%= render PopoverComponent.new key: "collection.depositors" %>
class PopoverComponent < ApplicationComponent
def initialize(key:, icon: "fa-solid fa-info-circle", scope: "tooltip")
@key = key
Expand Down

0 comments on commit 8aa8e33

Please sign in to comment.