🎉 创世提交

This commit is contained in:
柚子
2025-01-22 01:48:07 +08:00
commit 5d3481b9ea
92 changed files with 11705 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
import { Component } from 'solid-js';
import { Skeleton } from "@/components/ui/skeleton";
import BaseCarousel from "@/components/ui/base-carousel";
interface ScreenshotCarouselProps {
screenshots?: {
url: string;
title: string;
}[];
loading?: boolean;
}
const ScreenshotCarousel: Component<ScreenshotCarouselProps> = (props) => {
const renderItem = (screenshot: NonNullable<ScreenshotCarouselProps['screenshots']>[0]) => (
<div class="w-full h-full aspect-[16/9]">
<img
src={screenshot.url}
alt={screenshot.title}
class="w-full h-full object-cover rounded-lg"
/>
</div>
);
const renderSkeleton = () => (
<div class="w-full h-full aspect-[16/9]">
<Skeleton class="w-full h-full rounded-lg" />
</div>
);
return (
<BaseCarousel
items={props.screenshots}
loading={props.loading}
renderItem={renderItem}
renderSkeleton={renderSkeleton}
/>
);
};
export default ScreenshotCarousel;