2023-07-31 20:54:52 +02:00
|
|
|
import {
|
|
|
|
Container,
|
|
|
|
ContentJustify,
|
|
|
|
PageHeader,
|
|
|
|
Section,
|
|
|
|
} from "./components/index.js";
|
2023-04-19 22:44:06 +02:00
|
|
|
|
|
|
|
const FormsPreview = ({ widgetsFor, widgetFor, entry }) => {
|
2023-05-29 16:22:34 +02:00
|
|
|
return [
|
|
|
|
PageHeader(entry),
|
2023-07-31 20:54:52 +02:00
|
|
|
Section(
|
|
|
|
Container([
|
|
|
|
h("h2", { className: "mb-4" }, entry.data.title),
|
|
|
|
ContentJustify([
|
|
|
|
widgetsFor("files").map((file) =>
|
|
|
|
h(
|
|
|
|
"div",
|
|
|
|
{
|
|
|
|
className: "card border-primary rounded-0 hover-shadow mb-2",
|
|
|
|
},
|
2023-05-29 16:22:34 +02:00
|
|
|
h(
|
|
|
|
"div",
|
2023-07-31 20:54:52 +02:00
|
|
|
{ className: "card-body mb-0" },
|
|
|
|
h("h4", { className: "card-title" }, file.data.title),
|
2023-05-29 16:22:34 +02:00
|
|
|
h(
|
2023-07-31 20:54:52 +02:00
|
|
|
"a",
|
2023-05-29 16:22:34 +02:00
|
|
|
{
|
|
|
|
className:
|
2023-07-31 20:54:52 +02:00
|
|
|
"text-decoration-none btn btn-primary btn-sm mb-0",
|
2023-05-29 16:22:34 +02:00
|
|
|
},
|
2023-07-31 20:54:52 +02:00
|
|
|
h("i", {
|
|
|
|
className: "mdi mdi-tray-arrow-down me-2",
|
|
|
|
}),
|
|
|
|
"Download"
|
2023-05-29 16:22:34 +02:00
|
|
|
)
|
|
|
|
)
|
2023-07-31 20:54:52 +02:00
|
|
|
)
|
|
|
|
),
|
|
|
|
widgetFor("body"),
|
|
|
|
]),
|
|
|
|
])
|
2023-05-29 16:22:34 +02:00
|
|
|
),
|
|
|
|
];
|
2023-04-19 22:44:06 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
export default FormsPreview;
|