fix: add option for height

This commit is contained in:
Fredrik Burmester
2024-08-21 20:21:21 +02:00
parent a37ac74e9f
commit 9a621cab4e

View File

@@ -9,10 +9,12 @@ import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
type ContinueWatchingPosterProps = { type ContinueWatchingPosterProps = {
item: BaseItemDto; item: BaseItemDto;
width?: number;
}; };
const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({ const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
item, item,
width = 176,
}) => { }) => {
const [api] = useAtom(apiAtom); const [api] = useAtom(apiAtom);
@@ -33,11 +35,21 @@ const ContinueWatchingPoster: React.FC<ContinueWatchingPosterProps> = ({
if (!url) if (!url)
return ( return (
<View className="w-44 aspect-video border border-neutral-800"></View> <View
className="aspect-video border border-neutral-800"
style={{
width,
}}
></View>
); );
return ( return (
<View className="w-44 relative aspect-video rounded-lg overflow-hidden border border-neutral-800"> <View
style={{
width,
}}
className="relative aspect-video rounded-lg overflow-hidden border border-neutral-800"
>
<Image <Image
key={item.Id} key={item.Id}
id={item.Id} id={item.Id}