import { Avatar, Box, Stack, Typography } from '@mui/material'; import type { LiteralUnion } from 'type-fest'; type Props = { name: string; description?: string; logo?: string; size?: number; extra?: React.ReactNode; variant?: LiteralUnion<'square' | 'rounded' | 'circular', string>; }; // FIXME: @wangshijun add image filter for logo export default function ProductCard({ size = 48, variant = 'rounded', name, logo = '', description = '', extra = undefined, }: Props) { const s = { width: size, height: size }; return ( {logo ? ( // @ts-ignore ) : ( // @ts-ignore {(name || '?').slice(0, 1)} )} {name} {description && ( {description} )} {extra && ( {extra} )} ); }