UNPKG

preact-material-design

Version:
28 lines 1.29 kB
var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { h, Component } from 'preact'; var CardHeader = (function (_super) { __extends(CardHeader, _super); function CardHeader() { return _super !== null && _super.apply(this, arguments) || this; } CardHeader.prototype.render = function () { var _a = this.props, avatar = _a.avatar, title = _a.title, subtitle = _a.subtitle; return h("div", { class: "pmd-card-header pmd-card--includes-padding" }, avatar && h("img", { class: "pmd-card-header__avatar", src: avatar }), h("div", { class: "pmd-card-header__titles" }, h("h1", null, title), h("h2", null, subtitle))); }; return CardHeader; }(Component)); export { CardHeader }; //# sourceMappingURL=CardHeader.js.map