preact-material-design
Version:
A set of material components for Preact.
26 lines • 1.08 kB
JavaScript
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 Chip = (function (_super) {
__extends(Chip, _super);
function Chip() {
return _super !== null && _super.apply(this, arguments) || this;
}
Chip.prototype.render = function () {
var _a = this.props, image = _a.image, children = _a.children;
return h("div", { class: "pmd-chip" },
image && h("img", { src: image }),
h("span", { class: "pmd-chip__text" }, children));
};
return Chip;
}(Component));
export { Chip };
//# sourceMappingURL=Chip.js.map