Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

603 B
Raw Blame
import { Box } from '@chakra-ui/react';

import type { GalleryWidgetProps } from './GalleryUiContext';

import { useGalleryLayout } from './galleryDensity';
import { GalleryStackedLayout } from './GalleryStackedLayout';
import { GalleryWideLayout } from './GalleryWideLayout';

export const GalleryLayout = ({ region }: { region: GalleryWidgetProps['region'] }) => {
  const { layout, rootRef } = useGalleryLayout(region);

  return (
    <Box ref={rootRef} h="full" maxW="full" minH="0" minW="0" w="full">
      {layout === 'wide' ? <GalleryWideLayout /> : <GalleryStackedLayout />}
    </Box>
  );
};