update DemoSkeletonText,

This commit is contained in:
louiscklaw
2025-06-08 11:05:39 +08:00
parent a40b0fa4b1
commit 5b10977a64
13 changed files with 286 additions and 128 deletions

View File

@@ -0,0 +1,36 @@
import {
IonItem,
IonLabel,
IonList,
IonSkeletonText,
IonThumbnail,
} from "@ionic/react";
export const SkeletonPosts = (): JSX.Element => {
const postAmount = 10;
return (
<IonList>
{[...Array(postAmount)].map((post, index) => {
return (
<IonItem key={index}>
<IonThumbnail slot="start">
<IonSkeletonText animated />
</IonThumbnail>
<IonLabel>
<h3>
<IonSkeletonText animated style={{ width: "50%" }} />
</h3>
<p>
<IonSkeletonText animated style={{ width: "100%" }} />
</p>
<p>
<IonSkeletonText animated style={{ width: "30%" }} />
</p>
</IonLabel>
</IonItem>
);
})}
</IonList>
);
};