Files
hummingbot-dashboard/frontend/components/card.py
2024-05-09 10:32:21 -03:00

35 lines
1.3 KiB
Python

from streamlit_elements import mui
from frontend.components.dashboard import Dashboard
class Card(Dashboard.Item):
DEFAULT_CONTENT = (
"This impressive paella is a perfect party dish and a fun meal to cook "
"together with your guests. Add 1 cup of frozen peas along with the mussels, "
"if you like."
)
def __call__(self, content):
with mui.Card(key=self._key, sx={"display": "flex", "flexDirection": "column", "borderRadius": 3, "overflow": "hidden"}, elevation=1):
mui.CardHeader(
title="Shrimp and Chorizo Paella",
subheader="September 14, 2016",
avatar=mui.Avatar("R", sx={"bgcolor": "red"}),
action=mui.IconButton(mui.icon.MoreVert),
className=self._draggable_class,
)
mui.CardMedia(
component="img",
height=194,
image="https://mui.com/static/images/cards/paella.jpg",
alt="Paella dish",
)
with mui.CardContent(sx={"flex": 1}):
mui.Typography(content)
with mui.CardActions(disableSpacing=True):
mui.IconButton(mui.icon.Favorite)
mui.IconButton(mui.icon.Share)