Skip to content

Commit

Permalink
#9 feat : person, time counter module
Browse files Browse the repository at this point in the history
  • Loading branch information
luckylooky2 committed Mar 18, 2023
1 parent 7d2e449 commit e4eeb7b
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
20 changes: 20 additions & 0 deletions front/src/components/party/PersonCounter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import Typography from "@mui/joy/Typography";
import Person from "@mui/icons-material/Person";

type NumberOfPerson = { current: number; max: number };

const PersonCounter = (num: NumberOfPerson) => {
return (
<div style={{ display: "flex", flexDirection: "row", gap: 5 }}>
<Person fontSize="small" />
<Typography
level="body3"
sx={{ fontWeight: "md", color: "text.secondary" }}
>
{num.current} / {num.max}
</Typography>
</div>
);
};

export default PersonCounter;
21 changes: 21 additions & 0 deletions front/src/components/party/TimeCounter.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import Typography from "@mui/joy/Typography";
import AccessTimeIcon from "@mui/icons-material/AccessTime";
import format from "date-fns/format";

type DueDate = { dueDate: Date };

const TimeCounter = (date: DueDate) => {
return (
<div style={{ display: "flex", flexDirection: "row", gap: 5 }}>
<AccessTimeIcon fontSize="small" />
<Typography
level="body3"
sx={{ fontWeight: "md", color: "text.secondary" }}
>
~ {format(date.dueDate, "MM-dd eee HH:mm")}
</Typography>
</div>
);
};

export default TimeCounter;

0 comments on commit e4eeb7b

Please sign in to comment.