Class: Protos::Card

Inherits:
Component show all
Defined in:
lib/protos/card.rb,
lib/protos/card/body.rb,
lib/protos/card/image.rb,
lib/protos/card/title.rb,
lib/protos/card/actions.rb

Defined Under Namespace

Classes: Actions, Body, Image, Title

Constant Summary collapse

ImageDisplays =
Types::Coercible::Symbol.enum(:default, :overlay, :side)
IMAGE_DISPLAYS =
{
  default: "",
  overlay: "image-full",
  side: "card-side"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#actionsObject



38
# File 'lib/protos/card.rb', line 38

def actions(...) = render Actions.new(...)

#bodyObject



32
# File 'lib/protos/card.rb', line 32

def body(...) = render Body.new(...)

#imageObject



34
# File 'lib/protos/card.rb', line 34

def image(...) = render Image.new(...)

#titleObject



36
# File 'lib/protos/card.rb', line 36

def title(...) = render Title.new(...)

#view_templateObject



28
29
30
# File 'lib/protos/card.rb', line 28

def view_template(&)
  article(**attrs, &)
end