import Inventory2OutlinedIcon from '@mui/icons-material/Inventory2Outlined'; import Box from '@mui/material/Box'; import ButtonBase from '@mui/material/ButtonBase'; import Typography from '@mui/material/Typography'; import { Tile, tileBaseSx } from './Tile'; import { formatPrice } from '../../utils/price'; import { articleSku } from '../../pages/artikel/articleRoute'; import ArticlePhoto from '../article/ArticlePhoto'; export class ArticleTile extends Tile { hasPhoto() { const { article } = this.props; return article?.thumbHash != null || article?.fullHash != null; } renderIcon() { return ; } renderSecondary() { const { article } = this.props; if (!article) return null; const sku = articleSku(article); return ( <> {sku ? ( {sku} ) : null} {article.net != null && ( {formatPrice(article.net)} )} ); } render() { if (!this.hasPhoto()) { return super.render(); } const { article, label, sx, disabled } = this.props; const sku = articleSku(article); return ( {label ? ( {label} ) : null} {sku ? ( {sku} ) : null} ); } }