-
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.
- Loading branch information
1 parent
03b4e83
commit dc262a4
Showing
3 changed files
with
82 additions
and
1 deletion.
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,37 @@ | ||
import clsx from "clsx"; | ||
|
||
type Props = { | ||
title: string; // title | ||
description: string; // description | ||
children?: React.ReactNode; | ||
textSize: "sm" | "default" | "lg" | "xl"; | ||
}; | ||
|
||
function BlockWall({ | ||
title, | ||
description, | ||
children, | ||
textSize = "default", | ||
}: Props) { | ||
return ( | ||
<div className="absolute inset-0 z-50 flex flex-col items-center justify-center p-4 backdrop-blur backdrop-filter bg-foreground/5"> | ||
<div className="flex flex-col items-center justify-center space-y-2"> | ||
<h1 | ||
className={clsx( | ||
"font-semibold text-center text-foreground", | ||
// based on the textSize prop, we can change the font size | ||
textSize == "default" ? "text-md" : `text-${textSize}` | ||
)} | ||
> | ||
{title} | ||
</h1> | ||
<p className="text-center text-foreground">{description}</p> | ||
</div> | ||
<div className="flex flex-col items-center justify-center mt-4 space-y-2"> | ||
{children} | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
export default BlockWall; |
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