Skip to content

Commit

Permalink
ELA-784: add possibilty to pass extra_class_body and extra_class_footer
Browse files Browse the repository at this point in the history
  • Loading branch information
libetho committed Jan 8, 2024
1 parent 15b510a commit e096877
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions templates/patterns/card/card.ui_patterns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ card:
label: 'Content'
description: 'Card content.'
preview: '<button class="btn btn-primary">Custom action</button>'
extra_classes_body:
type: string
label: 'Extra classes body'
description: 'Can be set additional classes for card body/content.'
header:
type: text
label: 'Card header'
Expand All @@ -61,6 +65,10 @@ card:
label: 'Card footer'
description: 'Card footer content.'
preview: 'Footer of card'
extra_classes_footer:
type: string
label: 'Extra classes footer'
description: 'Can be set additional classes for card footer.'
badges:
type: array
label: 'Badges'
Expand Down
2 changes: 2 additions & 0 deletions templates/patterns/card/pattern-card.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,15 @@
'tag': 'div',
} : {},
'content': _content,
'extra_classes_body' : extra_classes_body,
'image': image ? {
'path': image.src,
'alt': image.alt,
},
'date': date|default({}),
'card_header': header,
'card_footer': footer,
'extra_classes_footer' : extra_classes_footer,
'badges': _badges,
'attributes': attributes,
} only %}
Expand Down

0 comments on commit e096877

Please sign in to comment.