Initial
This commit is contained in:
15
QuickViewModal.js
Normal file
15
QuickViewModal.js
Normal file
@ -0,0 +1,15 @@
|
||||
import { Fragment } from '@wordpress/element';
|
||||
|
||||
export default function QuickViewModal({ post, onClose }) {
|
||||
if (!post) return null;
|
||||
|
||||
return (
|
||||
<div className="quickview-modal" onClick={onClose}>
|
||||
<div className="quickview-content" onClick={e => e.stopPropagation()}>
|
||||
<button className="quickview-close" onClick={onClose}>×</button>
|
||||
<h3 dangerouslySetInnerHTML={{ __html: post.title?.rendered || '' }} />
|
||||
<div dangerouslySetInnerHTML={{ __html: post.content?.rendered || '' }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user