UNPKG

infinity-forge

Version:
51 lines 2.72 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || (function () { var ownKeys = function(o) { ownKeys = Object.getOwnPropertyNames || function (o) { var ar = []; for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k; return ar; }; return ownKeys(o); }; return function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]); __setModuleDefault(result, mod); return result; }; })(); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ListBlog = ListBlog; var jsx_runtime_1 = require("react/jsx-runtime"); var link_1 = __importDefault(require("next/link")); var ui_1 = require("../../../../ui/index.js"); var card_1 = require("./card/index.js"); var carousel_configs_1 = require("./carousel-configs.js"); var S = __importStar(require("./styles.js")); function ListBlog(_a) { var data = _a.data, title = _a.title, linkText = _a.linkText; var Carousel = (0, ui_1.useCarousel)({ Component: card_1.BlogCard, id: 'ListBlog', items: data, config: carousel_configs_1.carouselConfigs }).Carousel; return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'ListBlog', children: (0, jsx_runtime_1.jsx)(S.ListBlog, { children: (0, jsx_runtime_1.jsxs)(ui_1.Container, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'blog-title', children: [(0, jsx_runtime_1.jsx)("h2", { className: 'font-48-bold', children: title ? title : 'Blog' }), (0, jsx_runtime_1.jsx)(link_1.default, { className: 'font-16-bold', href: '/blog/todos', children: linkText ? linkText : 'Ver todos os posts' })] }), (0, jsx_runtime_1.jsx)(Carousel, {})] }) }) })); } //# sourceMappingURL=component.js.map