import React from "react"; import "./index.scss"; const maxDesktopSize = 1250; const maxMobileSize = 550; const fontSize = { desktop: { span: window.innerWidth > maxDesktopSize ? 14 : window.innerWidth / 80, }, mobile: { span: window.innerWidth > maxMobileSize ? 14 : window.innerWidth / 30, }, }; export default function Document(props) { const { parent, name } = props; return ( <> {window.innerWidth < 1000 ? (
parent.onChange(e.target.name, e.target.files[0], "file") } /> {parent.state.file ? ( {parent.state.file?.name || "تصویر بارگزاری شد"} ) : ( در صورت نیاز تصویر مرتبط را انتخاب کنید. )}
) : null} {window.innerWidth > 1000 ? (
parent.onChange(e.target.name, e.target.files[0], "file") } />{" "} {parent.state.file ? ( {parent.state.file?.name || "فایل ثبت شد"} ) : ( در صورت نیاز تصویر مرتبط را انتخاب کنید. )}
) : null} ); }