@etsoo/website
Version:
ETSOO CMS Based NextJs Website Framework
18 lines (17 loc) • 1.34 kB
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import React from 'react';
import { SiteUtils } from '../site/SiteUtils';
/**
* Common title description list tab page
* @param props Props
* @returns Component
*/
export function CommonTitleDescriptionListPage(props) {
// Destruct
const { siteData, tab, articles, noDescription } = props;
// Layout
return (_jsxs(React.Fragment, { children: [!noDescription && tab.description && (_jsx("div", { className: "tab-description-box text-justify", children: tab.description })), _jsx("div", { className: "container tab-list", children: articles.map((article) => {
var _a, _b;
return (_jsx("div", { className: "row", children: _jsxs("div", { className: "col-12 tab-list-container", children: [_jsx("div", { className: "tab-list-title", children: _jsx("a", { href: SiteUtils.formatLink(article), children: article.title }) }), _jsxs("div", { className: "text-justify tab-list-description", children: [article.description, _jsx("a", { className: "tab-list-more", href: SiteUtils.formatLink(article), children: (_b = (_a = siteData.resources.find((r) => r.id === 'readMoreLabel')) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 'Read More' })] })] }) }, article.id));
}) })] }));
}