Class: Essence::Skeleton
- Defined in:
- lib/essence/components/skeleton.rb
Constant Summary collapse
- CLASSES =
"animate-pulse bg-gray-200/55 rounded-xs"
Constants inherited from Essence
Instance Attribute Summary
Attributes inherited from Essence
Instance Method Summary collapse
-
#initialize(**attributes) ⇒ Skeleton
constructor
A new instance of Skeleton.
- #view_template ⇒ Object
Constructor Details
#initialize(**attributes) ⇒ Skeleton
Returns a new instance of Skeleton.
6 7 8 9 |
# File 'lib/essence/components/skeleton.rb', line 6 def initialize(**attributes) @attributes = attributes @attributes[:class] = @attributes[:class] ? TAILWIND_MERGER.merge([ CLASSES, @attributes[:class] ]) : CLASSES end |
Instance Method Details
#view_template ⇒ Object
11 12 13 |
# File 'lib/essence/components/skeleton.rb', line 11 def view_template(&) div(**@attributes, &) end |