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

Sizes =
Types::Coercible::Symbol.enum(
  :default,
  :xs,
  :sm,
  :md,
  :lg,
  :xl
)
SIZES =
{
  default: "card-md",
  xs: "card-xs",
  sm: "card-sm",
  md: "card-md",
  lg: "card-lg",
  xl: "card-xl"
}.freeze

Instance Method Summary collapse

Methods inherited from Component

#initialize

Constructor Details

This class inherits a constructor from Protos::Component

Instance Method Details

#actionsObject



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

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

#bodyObject



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

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

#imageObject



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

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

#titleObject



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

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

#view_templateObject



43
44
45
# File 'lib/protos/card.rb', line 43

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