feat: split pdf

This commit is contained in:
Ibrahima G. Coulibaly
2025-03-26 05:55:53 +00:00
parent e6f54a3f2b
commit ca778284b9
6 changed files with 128 additions and 87 deletions

View File

@@ -0,0 +1,23 @@
import React, { useRef } from 'react';
import BaseFileInput from './BaseFileInput';
import { BaseFileInputProps } from './file-input-utils';
interface PdfFileInputProps extends BaseFileInputProps {}
export default function ToolPdfInput({ ...props }: PdfFileInputProps) {
const pdfRef = useRef<HTMLIFrameElement>(null);
return (
<BaseFileInput {...props} type={'pdf'}>
{({ preview }) => (
<iframe
ref={pdfRef}
src={preview}
width="100%"
height="100%"
style={{ maxWidth: '500px' }}
/>
)}
</BaseFileInput>
);
}