22 lines
531 B
TypeScript
22 lines
531 B
TypeScript
import styles from '../ContentPreview.module.css';
|
|
|
|
interface ApplicationRendererProps {
|
|
previewUrl: string;
|
|
fileName: string;
|
|
mimeType?: string;
|
|
onError: () => void;
|
|
}
|
|
|
|
export function ApplicationRenderer({ previewUrl, fileName, mimeType, onError }: ApplicationRendererProps) {
|
|
return (
|
|
<iframe
|
|
src={previewUrl}
|
|
className={styles.previewIframe}
|
|
title={`Preview of ${fileName}`}
|
|
data-mime-type={mimeType}
|
|
onError={onError}
|
|
style={{ background: 'white !important' }}
|
|
/>
|
|
);
|
|
}
|
|
|