-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from Sports-day/feature/information-in-dashboard
ダッシュボードにお知らせリストを追加 feat: information list in dashboard
- Loading branch information
Showing
5 changed files
with
67 additions
and
32 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
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
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
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,57 @@ | ||
import {Information} from "@/src/models/InformationModel"; | ||
import {Stack, Typography, IconButton, Button} from "@mui/material"; | ||
import {HiOutlineInformationCircle} from "react-icons/hi"; | ||
import React from "react"; | ||
|
||
export type InformationListProps = { | ||
informationList: Information[] | ||
} | ||
|
||
export default function InformationList(props: InformationListProps) { | ||
const list = props.informationList.map((information) => { | ||
return ( | ||
<Button href={`/information/${information.id}`} sx={{py:1.5, px:2,mb:1, width:"100%", backgroundColor:"secondary.main", color:"text.primary"}} key={information.id}> | ||
<Stack spacing={1} direction={"row"} width={"100%"} justifyContent={"flex-start"} alignItems="center"> | ||
<Typography | ||
color={"text.primary"} | ||
sx={{fontSize: "12px", mx:2}} | ||
lineHeight={"1.2em"} | ||
> | ||
{information.id} | ||
</Typography> | ||
<IconButton | ||
sx={{backgroundColor: "background.default"}} | ||
> | ||
<HiOutlineInformationCircle color={"text.primary"}/> | ||
</IconButton> | ||
<Stack | ||
direction={"column"} | ||
justifyContent={"space-between"} | ||
alignItems={"flex-start"} | ||
spacing={1} | ||
> | ||
<Typography | ||
color={"text.primary"} | ||
sx={{fontSize: "14px", fontWeight: "bold"}} | ||
lineHeight={"1.2em"} | ||
> | ||
{information.name} | ||
</Typography> | ||
<Typography | ||
color={"text.primary"} | ||
sx={{fontSize: "14px"}} | ||
lineHeight={"1.2em"} | ||
> | ||
{information.content} | ||
</Typography> | ||
</Stack> | ||
</Stack> | ||
</Button> | ||
) | ||
}) | ||
return ( | ||
<> | ||
{list} | ||
</> | ||
) | ||
} |
This file was deleted.
Oops, something went wrong.