@ausbom/card
Advanced tools
Comparing version 0.5.2 to 0.5.3
@@ -6,2 +6,14 @@ # Change Log | ||
<a name="0.5.3"></a> | ||
## [0.5.3](https://github.com/AusBOM/bom-design-system/compare/@ausbom/card@0.5.2...@ausbom/card@0.5.3) (2020-04-01) | ||
### Bug Fixes | ||
* does not render 0 when meta attr array is empty/not passed ([8982790](https://github.com/AusBOM/bom-design-system/commit/8982790)) | ||
<a name="0.5.2"></a> | ||
@@ -8,0 +20,0 @@ ## [0.5.2](https://github.com/AusBOM/bom-design-system/compare/@ausbom/card@0.5.1...@ausbom/card@0.5.2) (2020-03-31) |
@@ -11,3 +11,3 @@ import React from 'react' | ||
titleTag?: React.ElementType | ||
meta?: React.ReactNode | ||
meta?: Array<string> | ||
[x: string]: any | ||
@@ -14,0 +14,0 @@ } |
"use strict";var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports["default"]=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classnames=_interopRequireDefault(require("classnames"));var _react=_interopRequireDefault(require("react"));var MediaCard=/*#__PURE__*/function(_React$PureComponent){(0,_inherits2["default"])(MediaCard,_React$PureComponent);function MediaCard(){(0,_classCallCheck2["default"])(this,MediaCard);return(0,_possibleConstructorReturn2["default"])(this,(0,_getPrototypeOf2["default"])(MediaCard).apply(this,arguments))}(0,_createClass2["default"])(MediaCard,[{key:"render",value:function render(){var _ref=this.props,Tag=_ref.as,className=_ref.className,id=_ref.id,image=_ref.image,title=_ref.title,TitleTag=_ref.titleTag,horizontal=_ref.horizontal,meta=_ref.meta,innerRef=_ref.innerRef,children=_ref.children,restProps=(0,_objectWithoutProperties2["default"])(_ref,["as","className","id","image","title","titleTag","horizontal","meta","innerRef","children"]);// eslint-disable-line no-empty-pattern | ||
var classes=(0,_classnames["default"])(className,"bom-media-card",{"bom-media-card--stacked":!horizontal,"bom-media-card--with-image":!!image});var metaItems=_react["default"].Children.map(meta,function(data){return _react["default"].createElement("div",{className:"bom-media-card-meta__item"},data)});return _react["default"].createElement(Tag,(0,_extends2["default"])({className:classes,"aria-describedby":meta?id:undefined,ref:innerRef},restProps),image&&_react["default"].createElement("div",{className:"bom-media-card__img"},image),_react["default"].createElement("div",{role:"text",className:"bom-media-card__text"},_react["default"].createElement(TitleTag,{className:"bom-media-card__title"},title),metaItems&&metaItems.length&&_react["default"].createElement("div",{className:"bom-media-card-meta"},metaItems),children&&_react["default"].createElement("div",{id:id,className:"bom-media-card__desc"},children)))}}]);return MediaCard}(_react["default"].PureComponent);(0,_defineProperty2["default"])(MediaCard,"defaultProps",{as:"a",titleTag:"h3",horizontal:false});var MediaCardWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(MediaCard,(0,_extends2["default"])({innerRef:ref},props))});MediaCardWithRef.displayName="MediaCard";var _default=MediaCardWithRef;exports["default"]=_default; | ||
var classes=(0,_classnames["default"])(className,"bom-media-card",{"bom-media-card--stacked":!horizontal,"bom-media-card--with-image":!!image});var metaItems=_react["default"].Children.map(meta,function(data){return _react["default"].createElement("div",{className:"bom-media-card-meta__item"},data)});return _react["default"].createElement(Tag,(0,_extends2["default"])({className:classes,"aria-describedby":meta?id:undefined,ref:innerRef},restProps),image&&_react["default"].createElement("div",{className:"bom-media-card__img"},image),_react["default"].createElement("div",{role:"text",className:"bom-media-card__text"},_react["default"].createElement(TitleTag,{className:"bom-media-card__title"},title),meta&&meta.length>0&&_react["default"].createElement("div",{className:"bom-media-card-meta"},metaItems),children&&_react["default"].createElement("div",{id:id,className:"bom-media-card__desc"},children)))}}]);return MediaCard}(_react["default"].PureComponent);(0,_defineProperty2["default"])(MediaCard,"defaultProps",{as:"a",titleTag:"h3",horizontal:false});var MediaCardWithRef=_react["default"].forwardRef(function(props,ref){return _react["default"].createElement(MediaCard,(0,_extends2["default"])({innerRef:ref},props))});MediaCardWithRef.displayName="MediaCard";var _default=MediaCardWithRef;exports["default"]=_default; |
{ | ||
"name": "@ausbom/card", | ||
"version": "0.5.2", | ||
"version": "0.5.3", | ||
"description": "", | ||
@@ -46,3 +46,3 @@ "keywords": [], | ||
}, | ||
"gitHead": "a6eec044d50bf359d1b98b8fb0d896e584d31827" | ||
"gitHead": "ac6862ce08d201536f5183785385dc812bfd78f3" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26632