Skip to content

Commit

Permalink
Merge branch 'gr_card_classes' of https://github.com/prysmex/ember-eui
Browse files Browse the repository at this point in the history
  • Loading branch information
grodriguez85 committed May 27, 2022
2 parents 2e1f6d4 + 03cd7ec commit 4b65400
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/addon/components/eui-card/index.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
</span>
{{/if}}
{{#if (and (eq layout "vertical") (or (has-block "footer") @footer))}}
<div class="euiCard__footer">
<div class={{this.footerClasses}}>
{{#if (has-block "footer")}}
{{yield to="footer"}}
{{else}}
Expand Down
9 changes: 9 additions & 0 deletions packages/core/addon/components/eui-card/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ type EuiCardComponentArgs = {
* Class that will apply to the card content section.
*/
contentClassName?: string;

/**
* Class that will apply to the card footer section.
*/
footerClassName?: string;
};

export default class EuiCardComponent extends Component<EuiCardComponentArgs> {
Expand Down Expand Up @@ -41,4 +46,8 @@ export default class EuiCardComponent extends Component<EuiCardComponentArgs> {
get contentClasses(): string {
return ['euiCard__content', this.args.contentClassName].join(' ');
}

get footerClasses(): string {
return ['euiCard__footer', this.args.footerClassName].join(' ');
}
}

0 comments on commit 4b65400

Please sign in to comment.