@opexa/portal-components 0.0.583 → 0.0.584
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -26,6 +26,6 @@ export function GameProvidersList(props) {
|
|
|
26
26
|
const classNames = isString(props.className)
|
|
27
27
|
? { root: props.className }
|
|
28
28
|
: (props.className ?? {});
|
|
29
|
-
const chunked = useChunk(gameProviders,
|
|
30
|
-
return (_jsxs("div", { className: classNames.root, children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Providers' }), _jsxs("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: [props.showAllProviders && (_jsx(Link, { href: props.viewAllUrl ?? '/providers', className: twMerge('flex h-full w-full items-center justify-center overflow-hidden rounded-md bg-brand-800 font-extrabold lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View all games`, children: _jsx("p", { className: "text-center text-4xl", children: " ALL" }) })), chunked.loadedItems.map((provider) => (_jsx(Link, { href: viewGamesUrl(provider), className: twMerge('flex h-full w-full items-center overflow-hidden rounded-md bg-brand-800 lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: props.gameProviderImages?.[provider.id] ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full', classNames.thumbnailImage) }) }, provider.id)))] }), _jsxs("div", { className: "mt-2xl flex flex-col items-center lg:mt-3xl", children: [_jsx(Progress.Root, { min: 0, max: chunked.totalItems, value: chunked.totalLoadedItems, onValueChange: noop, className: twMerge('w-[12.5rem]', classNames.progressRoot), children: _jsx(Progress.Track, { className: twMerge('bg-bg-tertiary', classNames.progressTrack), children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "mt-md text-button-tertiary-fg text-sm", children: `Displaying ${chunked.totalLoadedItems} of ${chunked.totalItems}` }), chunked.hasNext && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: chunked.next, className: twMerge('mt-lg', classNames.loadMoreButton), children: "Load More" }))] })] }));
|
|
29
|
+
const chunked = useChunk(gameProviders, 24);
|
|
30
|
+
return (_jsxs("div", { className: classNames.root, children: [_jsx("h2", { className: "font-semibold text-lg", children: props.heading ?? 'Providers' }), _jsxs("div", { className: "mt-lg grid grid-cols-3 gap-1.5 lg:grid-cols-6 lg:gap-2.5", children: [props.showAllProviders && (_jsx(Link, { href: props.viewAllUrl ?? '/providers', className: twMerge('flex h-full w-full items-center justify-center overflow-hidden rounded-md bg-brand-800 font-extrabold lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View all games`, children: _jsx("p", { className: "text-center text-4xl", children: " ALL" }) })), chunked.loadedItems.map((provider) => (_jsx(Link, { href: viewGamesUrl(provider), className: twMerge('flex h-full w-full items-center overflow-hidden rounded-md bg-brand-800 lg:h-[5.75rem]', classNames.thumbnailRoot), "aria-label": `View ${provider.name} games`, children: _jsx(Image, { src: props.gameProviderImages?.[provider.id] ?? provider.logo, alt: "", width: 300, height: 150, className: twMerge('mx-auto h-auto w-full', classNames.thumbnailImage) }) }, provider.id)))] }), !props.showAllProviders && (_jsxs("div", { className: "mt-2xl flex flex-col items-center lg:mt-3xl", children: [_jsx(Progress.Root, { min: 0, max: chunked.totalItems, value: chunked.totalLoadedItems, onValueChange: noop, className: twMerge('w-[12.5rem]', classNames.progressRoot), children: _jsx(Progress.Track, { className: twMerge('bg-bg-tertiary', classNames.progressTrack), children: _jsx(Progress.Range, {}) }) }), _jsx("p", { className: "mt-md text-button-tertiary-fg text-sm", children: `Displaying ${chunked.totalLoadedItems} of ${chunked.totalItems}` }), chunked.hasNext && (_jsx(Button, { size: "sm", variant: "outline", fullWidth: false, onClick: chunked.next, className: twMerge('mt-lg', classNames.loadMoreButton), children: "Load More" }))] }))] }));
|
|
31
31
|
}
|