Class: Railsboot::TestimonialComponent
- Inherits:
-
Component
- Object
- Component
- Railsboot::TestimonialComponent
- Defined in:
- app/components/railsboot/testimonial_component.rb
Overview
Renders a testimonial with a quote, the person's name, and their role.
Instance Method Summary collapse
-
#initialize(name: "", role: "", **html_attributes) ⇒ TestimonialComponent
constructor
A new instance of TestimonialComponent.
Constructor Details
#initialize(name: "", role: "", **html_attributes) ⇒ TestimonialComponent
Returns a new instance of TestimonialComponent.
22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/components/railsboot/testimonial_component.rb', line 22 def initialize(name: "", role: "", **html_attributes) @name = name @role = role @html_attributes = html_attributes @html_attributes[:class] = class_names( "bg-primary bg-opacity-5", "border-0", html_attributes[:class] ) end |