mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-23 11:39:50 +02:00
restore banner
This commit is contained in:
1 parent
1e1040816b
commit
edc3aba545
32 files changed
+90
-26
No files matched your search
@@ -0,0 +1,7 @@
|
||||
.icon {
|
||||
/* height="5rem" */
|
||||
}
|
||||
|
||||
.name {
|
||||
/* height="1em" */
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
import { memo, useRef } from "react";
|
||||
import { useIntersection } from "../../hooks/useIntersection";
|
||||
import { Flex } from "../Flex";
|
||||
import { Skeleton } from "../Skeleton";
|
||||
import styles from "./index.module.css";
|
||||
|
||||
interface SkeletonTankCardProps {
|
||||
onIntersection?: () => void;
|
||||
}
|
||||
|
||||
export const TankCardSkeleton = memo(
|
||||
({ onIntersection }: SkeletonTankCardProps) => {
|
||||
const card = useRef<HTMLDivElement>(null!);
|
||||
|
||||
useIntersection(() => onIntersection?.(), card, {
|
||||
disabled: onIntersection === undefined,
|
||||
});
|
||||
|
||||
return (
|
||||
<Flex column gap="2" ref={card}>
|
||||
<Skeleton className={styles.icon} />
|
||||
<Skeleton className={styles.name} />
|
||||
</Flex>
|
||||
);
|
||||
},
|
||||
() => true,
|
||||
);
|
||||
Reference in new issue
Block a user