32 lines
684 B
TypeScript

/**
* PopupElement Component
*
* Popup trigger element.
* Renders with unified wrapper styling + content.
*/
import React from 'react';
import type { CSSProperties } from 'react';
import type { CanvasElement } from '../../../types/constructor';
interface PopupElementProps {
element: CanvasElement;
resolveUrl?: (url: string | undefined) => string;
className: string;
style: CSSProperties;
}
const PopupElement: React.FC<PopupElementProps> = ({
element,
className,
style,
}) => {
return (
<div className={className} style={style}>
<span className='px-4 py-2 text-sm'>{element.label || 'Popup'}</span>
</div>
);
};
export default PopupElement;