-
Notifications
You must be signed in to change notification settings - Fork 0
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
e13fd34
commit 728b43a
Showing
4 changed files
with
119 additions
and
19 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,49 @@ | ||
import { FC } from "react"; | ||
import { Card } from "./Card"; | ||
import cn from "classnames"; | ||
import Skeleton from "react-loading-skeleton"; | ||
|
||
export type GameItemCardProps = Partial<{ | ||
name: string; | ||
content: string; | ||
compact: boolean; | ||
}>; | ||
|
||
export const GameItemCard: FC<GameItemCardProps> = ({ | ||
name, | ||
content, | ||
compact, | ||
}) => { | ||
return ( | ||
<Card compact={compact}> | ||
<div | ||
className={cn( | ||
{ | ||
"sm:gap-4": !compact, | ||
"sm:gap-1": compact, | ||
}, | ||
"flex flex-col justify-between gap-1" | ||
)} | ||
> | ||
<div | ||
className={cn( | ||
"text-xl", | ||
"font-semibold dark:text-warmGray-50", | ||
"text-center" | ||
)} | ||
> | ||
{name ?? <Skeleton width={80} height={20} />} | ||
</div> | ||
<div | ||
className={cn( | ||
"text-lg", | ||
"font-semibold dark:text-warmGray-50", | ||
"text-center" | ||
)} | ||
> | ||
{content ?? <Skeleton width={80} height={20} />} | ||
</div> | ||
</div> | ||
</Card> | ||
); | ||
}; |
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