Files
fotospiel-app/resources/js/guest-v2/components/PhotoFrameTile.tsx
Codex Agent 1f9a43806a
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
tests / ui (push) Waiting to run
Refine guest gallery UI and add multi-photo upload flow
2026-02-09 18:01:01 +01:00

55 lines
1.4 KiB
TypeScript

import React from 'react';
import { YStack } from '@tamagui/stacks';
import { useGuestThemeVariant } from '../lib/guestTheme';
type PhotoFrameTileProps = {
height: number;
borderRadius?: number | string;
children?: React.ReactNode;
shimmer?: boolean;
shimmerDelayMs?: number;
};
export default function PhotoFrameTile({
height,
borderRadius = '$tile',
children,
shimmer = false,
shimmerDelayMs = 0,
}: PhotoFrameTileProps) {
const { isDark } = useGuestThemeVariant();
return (
<YStack
height={height}
borderRadius={borderRadius}
overflow="hidden"
position="relative"
backgroundColor="$muted"
style={{
boxShadow: isDark ? '0 10px 18px rgba(2, 6, 23, 0.36)' : '0 8px 14px rgba(15, 23, 42, 0.16)',
}}
>
{shimmer ? (
<YStack
position="absolute"
top={-40}
bottom={-40}
left="-60%"
width="60%"
backgroundColor="transparent"
style={{
backgroundImage:
'linear-gradient(120deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0))',
animation: 'guestNightShimmer 4.6s ease-in-out infinite',
animationDelay: `${shimmerDelayMs}ms`,
}}
/>
) : null}
<YStack position="relative" zIndex={1} flex={1}>
{children}
</YStack>
</YStack>
);
}