-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: simple GuildCard component without props
- Loading branch information
1 parent
077ce8b
commit c42fea7
Showing
3 changed files
with
46 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,32 @@ | ||
import { ImageSquare, Users } from "@phosphor-icons/react/dist/ssr"; | ||
import { Badge } from "app/components/ui/Badge"; | ||
import { Card } from "app/components/ui/Card"; | ||
import Link from "next/link"; | ||
|
||
export const GuildCard = () => { | ||
return ( | ||
<Link href="#" className="rounded-2xl outline-none focus-visible:ring-4"> | ||
<Card className="relative grid grid-cols-[theme(space.12)_1fr] grid-rows-2 items-center gap-x-4 gap-y-0.5 overflow-hidden rounded-2xl px-6 py-7 shadow-md before:absolute before:inset-0 before:bg-black/5 before:opacity-0 before:transition-opacity before:duration-200 before:content-[''] hover:before:opacity-55 active:before:opacity-85 dark:before:bg-white/5"> | ||
<div className="row-span-2 grid size-12 place-items-center rounded-full bg-image text-white"> | ||
<ImageSquare weight="duotone" className="size-6" /> | ||
</div> | ||
|
||
<h3 className="line-clamp-1 font-black font-display text-lg"> | ||
Sample guild | ||
</h3> | ||
<div className="flex flex-wrap gap-1"> | ||
<Badge> | ||
<Users className="size-4" /> | ||
<span> | ||
{new Intl.NumberFormat("en", { | ||
notation: "compact", | ||
}).format(125244)} | ||
</span> | ||
</Badge> | ||
|
||
<Badge>5 groups</Badge> | ||
</div> | ||
</Card> | ||
</Link> | ||
); | ||
}; |
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,11 @@ | ||
import { GuildCard } from "./components/GuildCard"; | ||
|
||
const Explorer = () => { | ||
return ( | ||
<main className="container mx-auto grid max-w-screen-lg gap-4 px-4 py-8 sm:grid-cols-2 lg:grid-cols-3"> | ||
<GuildCard /> | ||
</main> | ||
); | ||
}; | ||
|
||
export default Explorer; |
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