Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
60 lines
1.4 KiB
TypeScript
60 lines
1.4 KiB
TypeScript
import * as React from 'react';
|
|
import List from '@mui/material/List';
|
|
import ListItem from '@mui/material/ListItem';
|
|
import ListItemText from '@mui/material/ListItemText';
|
|
import Typography from '@mui/material/Typography';
|
|
|
|
const products = [
|
|
{
|
|
name: 'Professional plan',
|
|
desc: 'Monthly subscription',
|
|
price: '$15.00',
|
|
},
|
|
{
|
|
name: 'Dedicated support',
|
|
desc: 'Included in the Professional plan',
|
|
price: 'Free',
|
|
},
|
|
{
|
|
name: 'Hardware',
|
|
desc: 'Devices needed for development',
|
|
price: '$69.99',
|
|
},
|
|
{
|
|
name: 'Landing page template',
|
|
desc: 'License',
|
|
price: '$49.99',
|
|
},
|
|
];
|
|
|
|
interface InfoProps {
|
|
totalPrice: string;
|
|
}
|
|
|
|
export default function Info({ totalPrice }: InfoProps) {
|
|
return (
|
|
<React.Fragment>
|
|
<Typography variant="subtitle2" sx={{ color: 'text.secondary' }}>
|
|
Total
|
|
</Typography>
|
|
<Typography variant="h4" gutterBottom>
|
|
{totalPrice}
|
|
</Typography>
|
|
<List disablePadding>
|
|
{products.map((product) => (
|
|
<ListItem key={product.name} sx={{ py: 1, px: 0 }}>
|
|
<ListItemText
|
|
sx={{ mr: 2 }}
|
|
primary={product.name}
|
|
secondary={product.desc}
|
|
/>
|
|
<Typography variant="body1" sx={{ fontWeight: 'medium' }}>
|
|
{product.price}
|
|
</Typography>
|
|
</ListItem>
|
|
))}
|
|
</List>
|
|
</React.Fragment>
|
|
);
|
|
}
|