UNPKG

preact-material-components

Version:
82 lines 2.87 kB
var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; import { h } from 'preact'; import MaterialComponent from '../Base/MaterialComponent'; export class ImageListAspectContainer extends MaterialComponent { constructor() { super(...arguments); this.componentName = 'image-list__image-aspect-container'; this.mdcProps = []; } materialDom(props) { return h("div", Object.assign({}, props), this.props.children); } } export class ImageListItem extends MaterialComponent { constructor() { super(...arguments); this.componentName = 'image-list__item'; this.mdcProps = []; } materialDom(props) { return (h("li", Object.assign({}, props, { ref: this.setControlRef }), props.children)); } } export class ImageListImage extends MaterialComponent { constructor() { super(...arguments); this.componentName = 'image-list__image'; this.mdcProps = []; } materialDom(allprops) { const { src } = allprops, props = __rest(allprops, ["src"]); return (h("img", Object.assign({ src: src }, props, { ref: this.setControlRef }), props.children)); } } export class ImageListSupporting extends MaterialComponent { constructor() { super(...arguments); this.componentName = 'image-list__supporting'; this.mdcProps = []; } materialDom(props) { return h("div", Object.assign({}, props), this.props.children); } } export class ImageListLabel extends MaterialComponent { constructor() { super(...arguments); this.componentName = 'image-list__label'; this.mdcProps = []; } materialDom(props) { return (h("span", Object.assign({}, props, { ref: this.setControlRef }), props.children)); } } export class ImageList extends MaterialComponent { constructor() { super(...arguments); this.componentName = 'image-list'; this.mdcProps = ['masonry', 'with-text-protection']; } materialDom(props) { return (h("ul", Object.assign({}, props, { ref: this.setControlRef }), props.children)); } } export default class default_1 extends ImageList { } default_1.Item = ImageListItem; default_1.AspectContainer = ImageListAspectContainer; default_1.Image = ImageListImage; default_1.Supporting = ImageListSupporting; default_1.Label = ImageListLabel; //# sourceMappingURL=index.js.map