Permalink
Browse files

feat(card): add prop body-class (#1250)

feat(card): New prop body-class
  • Loading branch information...
tmorehouse committed Oct 27, 2017
1 parent c095b28 commit 23fc3bee4af15b9c107b968434718f57b78834d3
Showing with 13 additions and 6 deletions.
  1. +13 −6 lib/components/card-body.js
@@ -3,6 +3,10 @@ import { assign } from "../utils/object";
import { cardMixin } from "../mixins";
export const props = assign({}, copyProps(cardMixin.props, prefixPropName.bind(null, "body")), {
bodyClass: {
type: [String, Object, Array],
default: null
},
title: {
type: String,
default: null
@@ -52,12 +56,15 @@ export default {
props.bodyTag,
mergeData(data, {
staticClass: "card-body",
class: {
"card-img-overlay": props.overlay,
[`bg-${props.bodyBgVariant}`]: Boolean(props.bodyBgVariant),
[`border-${props.bodyBorderVariant}`]: Boolean(props.bodyBorderVariant),
[`text-${props.bodyTextVariant}`]: Boolean(props.bodyTextVariant)
}
class: [
{
"card-img-overlay": props.overlay,
[`bg-${props.bodyBgVariant}`]: Boolean(props.bodyBgVariant),
[`border-${props.bodyBorderVariant}`]: Boolean(props.bodyBorderVariant),
[`text-${props.bodyTextVariant}`]: Boolean(props.bodyTextVariant)
},
props.bodyClass || {}
]
}),
cardBodyChildren
);

0 comments on commit 23fc3be

Please sign in to comment.