Skip to content

Commit 884d3da

Browse files
committed
roomのdaisyUI移行?
1 parent 486766e commit 884d3da

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

web/components/chat/Room.tsx

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { ListItem, Stack, Typography } from "@mui/material";
21
import type { DMOverview } from "~/common/types";
32
import UserAvatar from "../human/avatar";
43

@@ -9,28 +8,14 @@ type Props = {
98
export function Room(props: Props) {
109
const { room } = props;
1110
return (
12-
<>
13-
<ListItem
14-
sx={{
15-
border: "1px solid gray",
16-
borderRadius: 1,
17-
cursor: "pointer",
18-
"&:hover": {
19-
background: "gainsboro",
20-
},
21-
}}
22-
>
23-
<Stack
24-
direction={"row"}
25-
spacing={2}
26-
alignItems="center"
27-
textAlign={"center"}
28-
>
29-
<UserAvatar pictureUrl={room.thumbnail} width="50px" height="50px" />
30-
<Typography variant="body2">{room.name}</Typography>
31-
<Typography variant="subtitle1">{room.lastMsg?.content}</Typography>
32-
</Stack>
33-
</ListItem>
34-
</>
11+
<div className="cursor-pointer rounded-md border border-gray-300 p-3 hover:bg-gray-200">
12+
<div className="flex items-center space-x-4">
13+
<UserAvatar pictureUrl={room.thumbnail} width="50px" height="50px" />
14+
<div className="text-center">
15+
<p className="font-medium text-sm">{room.name}</p>
16+
<p className="text-gray-500 text-xs">{room.lastMsg?.content}</p>
17+
</div>
18+
</div>
19+
</div>
3520
);
3621
}

0 commit comments

Comments
 (0)