UNPKG

@progress/sitefinity-nextjs-sdk

Version:

Provides OOB widgets developed using the Next.js framework, which includes an abstraction layer for Sitefinity communication. Additionally, it offers an expanded API, typings, and tools for further development and integration.

14 lines (13 loc) 1.69 kB
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; /* eslint-disable @next/next/no-img-element */ import React from 'react'; import { modifySfUrl } from './common'; export function ContentItemsListSection({ sectionData, isLoading, cssClassName }) { if (isLoading) { return (_jsx("div", { className: "skeleton-loader d-flex justify-content-center mb-4", children: _jsxs("svg", { width: "915", height: "111", viewBox: "0 0 915 111", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("rect", { width: "628", height: "38", fill: "#F0F0F0" }), _jsx("rect", { y: "65", width: "915", height: "16", fill: "#F0F0F0" }), _jsx("rect", { y: "95", width: "696", height: "16", fill: "#F0F0F0" })] }) })); } if (!Array.isArray(sectionData) || sectionData.length === 0) { return null; } return (_jsx("section", { className: `${cssClassName} container mt-4 mb-4`, children: _jsx("div", { className: "row", children: _jsx("div", { className: "col-12", children: sectionData.map((item, index) => (_jsxs(React.Fragment, { children: [_jsxs("div", { className: "d-flex", children: [item.image && (_jsx("div", { className: "flex-shrink-0", children: _jsx("img", { src: modifySfUrl(item.image?.url), className: "card-img-top", alt: item.title, title: item.title, style: { maxWidth: '500px' } }) })), _jsxs("div", { className: "flex-grow-1 ms-3", children: [_jsx("h4", { children: item.title }), _jsx("p", { children: item.content }), item.url && _jsx("a", { className: "btn btn-outline-dark", target: "_blank", rel: "noopener noreferrer", href: modifySfUrl(item.url), children: "Learn more" })] })] }), _jsx("hr", {})] }, index))) }) }) })); }