File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 11# frozen_string_literal: true
22
33module Flowbite
4+ # The link component can be used to set hyperlinks from one page to another or
5+ # to an external website when clicking on an inline text item, button, or card
6+ #
7+ # Use this component to add default styles to an inline link element.
48 class Link < ViewComponent ::Base
59 attr_reader :href , :options
610
@@ -10,6 +14,13 @@ def classes
1014 end
1115 end
1216
17+ # Initialize the Link component.
18+ #
19+ # @param href What to link to. This can be a String or anything else that
20+ # `link_to` supports. See `ActionView::Helpers::UrlHelper#link_to` for more
21+ # details.
22+ #
23+ # @param options [Hash] Additional HTML options for the link element
1324 def initialize ( href :, **options )
1425 super ( )
1526 @href = href
You can’t perform that action at this time.
0 commit comments