Skip to content

Instantly share code, notes, and snippets.

@sitefinitySDK
Created March 26, 2024 14:29
Show Gist options
  • Save sitefinitySDK/4752eb6674c928a2221726764fc0efda to your computer and use it in GitHub Desktop.
Save sitefinitySDK/4752eb6674c928a2221726764fc0efda to your computer and use it in GitHub Desktop.
import React from 'react';
import { WidgetContext, htmlAttributes } from '@progress/sitefinity-nextjs-sdk';
import { HelloWorldEntity } from './hello-world.entity';
export function HelloWorld(props: WidgetContext<HelloWorldEntity>) {
// attributes are needed for the widget to be visible in edit mode
const dataAttributes = htmlAttributes(props);
return (
<h1 {...dataAttributes}>{props.model.Properties.Content}</h1>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment