-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#9 feat : person, time counter module
- Loading branch information
1 parent
7d2e449
commit e4eeb7b
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |