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
Instance Method Details
#actions ⇒ Object
53
|
# File 'lib/protos/card.rb', line 53
def actions(...) = render Actions.new(...)
|
#body ⇒ Object
47
|
# File 'lib/protos/card.rb', line 47
def body(...) = render Body.new(...)
|
#image ⇒ Object
49
|
# File 'lib/protos/card.rb', line 49
def image(...) = render Image.new(...)
|
#title ⇒ Object
51
|
# File 'lib/protos/card.rb', line 51
def title(...) = render Title.new(...)
|
#view_template ⇒ Object
43
44
45
|
# File 'lib/protos/card.rb', line 43
def view_template(&)
article(**attrs, &)
end
|