diff --git a/src/components/index.ts b/src/components/index.ts new file mode 100644 index 00000000..d0b0465f --- /dev/null +++ b/src/components/index.ts @@ -0,0 +1,9 @@ +import { GRID_ASPECT_RATIO } from '@/app/config'; + +export const GRID_GAP_CLASSNAME = GRID_ASPECT_RATIO === 0 + ? 'gap-1 sm:gap-2' + : 'gap-0.5 sm:gap-1'; + +export const GRID_SPACE_CLASSNAME = GRID_ASPECT_RATIO === 0 + ? 'space-y-1 sm:space-y-2' + : 'space-y-0.5 sm:space-y-1'; diff --git a/src/photo/PhotoGrid.tsx b/src/photo/PhotoGrid.tsx index 64f9c8a9..117bfc1d 100644 --- a/src/photo/PhotoGrid.tsx +++ b/src/photo/PhotoGrid.tsx @@ -9,6 +9,7 @@ import { GRID_ASPECT_RATIO } from '@/app/config'; import { useAppState } from '@/state/AppState'; import SelectTileOverlay from '@/components/SelectTileOverlay'; import { ReactNode } from 'react'; +import { GRID_GAP_CLASSNAME } from '@/components'; export default function PhotoGrid({ photos, @@ -54,7 +55,8 @@ export default function PhotoGrid({ return ( } -
+
{start === end ? start - : <>{end}
– {start}} + : <>{end}
– {start}} ; const renderContentA = () => entity ?? ( @@ -96,7 +97,9 @@ export default function PhotoHeader({ items={[