Class: Flowbite::Link
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- Flowbite::Link
- Defined in:
- app/components/flowbite/link.rb
Instance Attribute Summary collapse
-
#href ⇒ Object
readonly
Returns the value of attribute href.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(href:, **options) ⇒ Link
constructor
A new instance of Link.
Constructor Details
#initialize(href:, **options) ⇒ Link
Returns a new instance of Link.
11 12 13 14 15 |
# File 'app/components/flowbite/link.rb', line 11 def initialize(href:, **) super() @href = href = end |
Instance Attribute Details
#href ⇒ Object (readonly)
Returns the value of attribute href.
3 4 5 |
# File 'app/components/flowbite/link.rb', line 3 def href @href end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
3 4 5 |
# File 'app/components/flowbite/link.rb', line 3 def end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
3 4 5 |
# File 'app/components/flowbite/link.rb', line 3 def text @text end |
Class Method Details
.classes ⇒ Object
6 7 8 |
# File 'app/components/flowbite/link.rb', line 6 def classes ["font-medium", "text-blue-600", "dark:text-blue-500", "hover:underline"].join(" ") end |
Instance Method Details
#call ⇒ Object
17 18 19 |
# File 'app/components/flowbite/link.rb', line 17 def call link_to(content, href, {class: self.class.classes}.merge()) end |