@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.
9 lines (8 loc) • 823 B
JavaScript
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
import { MultipleChoiceClient } from './multiple-choice-client';
export function MultipleChoiceDefaultView(viewProps) {
const multipleChoiceUniqueId = viewProps.widgetContext.model.Properties.SfFieldName;
const defaultRendering = (_jsxs(_Fragment, { children: [_jsx("script", { "data-sf-role": `start_field_${multipleChoiceUniqueId}`, "data-sf-role-field-name": `${multipleChoiceUniqueId}` }), _jsx(MultipleChoiceClient, { ...viewProps }), _jsx("script", { "data-sf-role": `end_field_${multipleChoiceUniqueId}` })] }));
return (_jsx(_Fragment, { children: viewProps.widgetContext.requestContext.isEdit ? _jsxs("div", { ...viewProps.attributes, children: [" ", defaultRendering, " "] })
: defaultRendering }));
}