-
Notifications
You must be signed in to change notification settings - Fork 6
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 #45 from han-kimm/feat/alert,TextField
✨feat: Alert, TextField 공통 컴포넌트 제작
- Loading branch information
Showing
6 changed files
with
74 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use client"; | ||
|
||
import Link from "next/link"; | ||
import { usePathname } from "next/navigation"; | ||
import RightArrowIcon from "@/public/icon/arrow-right_lg.svg"; | ||
import ExclamationIcon from "@/public/icon/exclamation.svg"; | ||
|
||
interface Props { | ||
message: string; | ||
href?: string; | ||
} | ||
|
||
const Alert = ({ message, href }: Props) => { | ||
const path = usePathname(); | ||
return ( | ||
<Link href={href || path} className="flex items-center justify-between rounded-sm bg-[#F63D3D0D] p-8"> | ||
<div className="flex-center gap-4"> | ||
<ExclamationIcon /> | ||
<p className="text-12 font-500 text-red">{message}</p> | ||
</div> | ||
<RightArrowIcon stroke="#F63D3D" /> | ||
</Link> | ||
); | ||
}; | ||
export default Alert; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.