Spaces:
Sleeping
Sleeping
File size: 1,146 Bytes
22c310d 0d37b12 22c310d 0d37b12 22c310d 0d37b12 22c310d 0d37b12 22c310d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
// a card item represent a news in newsSection
import { Card, Button } from "react-bootstrap";
export default function MenuItem({ dishName, description, imageSrc, deleteable = false, delButtonCallback = null }) {
return (
<Card className="align-items-center">
<Card.Img variant="top" src={imageSrc} />
<Card.Body>
<Card.Title>{dishName}</Card.Title>
<Card.Text>
{description}
</Card.Text>
{deleteable ? (
<div className="d-flex justify-content-end pb-3">
<Button size='sm' onClick={delButtonCallback} variant='danger'
style={{
position: 'absolute',
bottom: '20px', // Khoảng cách từ dưới lên
right: '20px' // Khoảng cách từ phải qua
}}>
Xóa
</Button>
</div>
) : (<></>)}
</Card.Body>
</Card>
);
} |