Class: ShapeComponent
- Defined in:
- app/components/shape_component.rb
Overview
Shape — 3D CSS shape transformations.
Usage:
Shape(type: :cube) {
text '<div class="sides">'.html_safe
text '<div class="side active">Side 1</div>'.html_safe
text '<div class="side">Side 2</div>'.html_safe
text '</div>'.html_safe
}
Constant Summary
Constants inherited from Component
Instance Method Summary collapse
Methods inherited from Component
default, #initialize, #render_in, slot
Constructor Details
This class inherits a constructor from Component
Instance Method Details
#to_s ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'app/components/shape_component.rb', line 16 def to_s classes = class_names( "ui", type, "shape" ) tag.div(class: classes, data: { controller: "fui-shape" }) { @content } end |