infinity-forge
Version:
26 lines • 1.34 kB
JavaScript
;
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContentNotification = ContentNotification;
var jsx_runtime_1 = require("react/jsx-runtime");
var card_1 = require("../card/index.js");
function ContentNotification(_a) {
var notifications = _a.notifications, CustomComponent = _a.CustomComponent;
if (!notifications || (notifications === null || notifications === void 0 ? void 0 : notifications.length) === 0) {
return (0, jsx_runtime_1.jsx)("p", { className: 'font-16-regular', children: "Nenhuma notifica\u00E7\u00E3o no momento." });
}
return notifications.map(function (notification) {
return CustomComponent ? ((0, jsx_runtime_1.jsx)(CustomComponent, __assign({}, notification), 'custom-notification-card' + notification.id)) : ((0, jsx_runtime_1.jsx)(card_1.NotificationCard, __assign({}, notification), 'notification-card' + notification.id));
});
}
//# sourceMappingURL=index.js.map