Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

made review us scrolling responsive to small screens #346

Merged
merged 1 commit into from
Jun 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions src/components/ui/reviewcarousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ export const ReviewCarousel: React.FC<ReviewCarouselProps> = ({ items }) => {
const columnItems = Math.ceil(items.length / 3);

return (
<div className="relative flex justify-center overflow-hidden h-96 w-full space-x-4">
<VerticalScrollColumn items={items.slice(0, columnItems)} speed="fast" />
<VerticalScrollColumn items={items.slice(columnItems, columnItems * 2)} speed="slow" />
<VerticalScrollColumn items={items.slice(columnItems * 2)} speed="fast" />
<div className="relative flex overflow-hidden h-96 w-full space-x-4">
{/* Visible on larger screens */}
<div className="hidden md:flex w-full space-x-4 justify-center">
<VerticalScrollColumn items={items.slice(0, columnItems)} speed="fast" />
<VerticalScrollColumn items={items.slice(columnItems, columnItems * 2)} speed="slow" />
<VerticalScrollColumn items={items.slice(columnItems * 2)} speed="fast" />
</div>
{/* Visible on smaller screens */}
<div className="flex md:hidden w-full justify-center">
<VerticalScrollColumn items={items} speed="slow" />
</div>
</div>
);
};
Loading