Restructure project to root layout
This commit is contained in:
1 parent
e0e26a34ab
commit
3ffe9bbf99
51 files changed
+16
-12
No files matched your search
@@ -0,0 +1,26 @@
|
||||
import { Card, CardContent, Stack, Typography } from '@mui/material';
|
||||
import { Product } from '../models/Product';
|
||||
|
||||
interface ProductRowProps {
|
||||
product: Product;
|
||||
}
|
||||
|
||||
export const ProductRow = ({ product }: ProductRowProps) => (
|
||||
<Card variant="outlined" sx={{ mb: 1 }}>
|
||||
<CardContent>
|
||||
<Stack direction="row" justifyContent="space-between" alignItems="center">
|
||||
<div>
|
||||
<Typography variant="subtitle1">{product.name}</Typography>
|
||||
<Typography variant="caption" color="text.secondary">
|
||||
{product.category} • {product.unit_type}
|
||||
</Typography>
|
||||
</div>
|
||||
{product.bulk_name && product.units_per_bulk ? (
|
||||
<Typography variant="caption" color="text.secondary">
|
||||
{product.units_per_bulk} per {product.bulk_name}
|
||||
</Typography>
|
||||
) : null}
|
||||
</Stack>
|
||||
</CardContent>
|
||||
</Card>
|
||||
);
|
||||
Reference in new issue
Block a user