PetalComponents.Card (petal_components v3.0.0)

View Source

Summary

Functions

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • variant (:string) - Defaults to "basic".
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • heading (:string) - creates a heading. Defaults to nil.
  • category (:string) - creates a category. Defaults to nil.
  • category_color_class (:any) - sets a category color class. Defaults to "pc-card__category--primary".
  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • aspect_ratio_class (:any) - aspect ratio class. Defaults to "aspect-video".
  • src (:string) - hosted image URL. Defaults to nil.
  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

Attributes

  • name (:string) (required) - The reviewer's name.
  • username (:string) (required) - The reviewer's username.
  • img (:string) (required) - URL of the reviewer's avatar.
  • body (:string) (required) - The review text content.
  • class (:string) - Additional classes. Defaults to "".
  • Global attributes are accepted.

Functions

card(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • variant (:string) - Defaults to "basic".
  • Global attributes are accepted.

Slots

  • inner_block

card_content(assigns)

Attributes

  • heading (:string) - creates a heading. Defaults to nil.
  • category (:string) - creates a category. Defaults to nil.
  • category_color_class (:any) - sets a category color class. Defaults to "pc-card__category--primary".
  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

card_footer(assigns)

Attributes

  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

card_media(assigns)

Attributes

  • aspect_ratio_class (:any) - aspect ratio class. Defaults to "aspect-video".
  • src (:string) - hosted image URL. Defaults to nil.
  • class (:any) - CSS class. Defaults to nil.
  • Global attributes are accepted.

Slots

  • inner_block

review_card(assigns)

Attributes

  • name (:string) (required) - The reviewer's name.
  • username (:string) (required) - The reviewer's username.
  • img (:string) (required) - URL of the reviewer's avatar.
  • body (:string) (required) - The review text content.
  • class (:string) - Additional classes. Defaults to "".
  • Global attributes are accepted.