mirror of
https://github.com/wah-su/wahs.wah.su.git
synced 2025-09-14 18:33:50 +05:00
Create a PlaceHolder component
This commit is contained in:
parent
a31c71ef7e
commit
a836d24d9f
3 changed files with 25 additions and 18 deletions
18
src/templates/Components/PlaceHolder.tsx
Normal file
18
src/templates/Components/PlaceHolder.tsx
Normal file
|
@ -0,0 +1,18 @@
|
|||
export default function Placeholder(props: {
|
||||
idx: string | number;
|
||||
isMobileHidden?: boolean;
|
||||
}) {
|
||||
return (
|
||||
<a
|
||||
data-type="placeholder__image"
|
||||
className={`relative aspect-square min-w-48 sm:min-w-auto rounded-sm overflow-hidden ${
|
||||
props.isMobileHidden ? "hidden xl:block" : ""
|
||||
}`}
|
||||
>
|
||||
<div
|
||||
id={`placeholder__image-${props.idx}-loader`}
|
||||
className="w-full h-full absolute inset-0 bg-gray-400 opacity-30 animate-pulse z-[3]"
|
||||
></div>
|
||||
</a>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue