import React from "react"; import DeleteOutlineOutlinedIcon from "@material-ui/icons/DeleteOutlineOutlined"; import "./index.scss"; const maxDesktopSize = 1250; const fontSize = { desktop: { info: { strong: window.innerWidth > maxDesktopSize ? 15 : window.innerWidth / 75, p: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 95, span: window.innerWidth > maxDesktopSize ? 12 : window.innerWidth / 95, }, price: { strong: window.innerWidth > maxDesktopSize ? 18 : window.innerWidth / 60, span: window.innerWidth > maxDesktopSize ? 13 : window.innerWidth / 95, }, counter: { button: window.innerWidth > maxDesktopSize ? 20 : window.innerWidth / 65, span: window.innerWidth > maxDesktopSize ? 15 : window.innerWidth / 65, }, delete: { span: window.innerWidth > maxDesktopSize ? 15 : window.innerWidth / 75, }, }, }; export default function Item(props) { const { data, handleCounter, handleDelete } = props; return ( {data.title}
{data.title}

{data.subTitle}

{data.options}بسته الحاقی:
{data.price} تومان {data.slicePrice} قیمت هر واحد
{data.number}
handleDelete(data.id)} /> handleDelete(data.id)} style={{ fontSize: fontSize.desktop.delete.span }} > حذف ); }