Class: Protos::Avatar
- Defined in:
- lib/protos/avatar.rb
Constant Summary collapse
- Indicators =
DOCS: The avatar component is used to represent a user or entity. daisyui.com/components/avatar/
Types::Coercible::Symbol.enum(:none, :online, :offline)
- MaskShapes =
Types::Coercible::Symbol.enum( :none, :squircle, :heart, :hexagon, :hexagon2, :decagon, :pentagon, :diamond, :square, :circle, :parallelogram, :parallelogram2, :parallelogram3, :parallelogram4, :star, :star2, :triangle, :triangle2, :triangle3, :triangle4, :half1, :half2 )
- SHAPES =
{ none: "", squircle: "mask mask-squircle", heart: "mask mask-heart", hexagon: "mask mask-hexagon", hexagon2: "mask mask-hexagon-2", decagon: "mask mask-decagon", pentagon: "mask mask-pentagon", diamond: "mask mask-diamond", square: "mask mask-square", circle: "mask mask-circle", parallelogram: "mask mask-parallelogram", parallelogram2: "mask mask-parallelogram-2", parallelogram3: "mask mask-parallelogram-3", parallelogram4: "mask mask-parallelogram-4", star: "mask mask-star", star2: "mask mask-star-2", triangle: "mask mask-triangle", triangle2: "mask mask-triangle-2", triangle3: "mask mask-triangle-3", triangle4: "mask mask-triangle-4", half1: "mask mask-half-1", half2: "mask mask-half-2" }.freeze
- INDICATORS =
{ none: "", online: "online", offline: "offline" }.freeze
Instance Method Summary collapse
Methods inherited from Component
Constructor Details
This class inherits a constructor from Protos::Component
Instance Method Details
#view_template(&block) ⇒ Object
75 76 77 78 79 |
# File 'lib/protos/avatar.rb', line 75 def view_template(&block) div(**attrs) do div(class: css[:figure], &block) end end |