Skip to content

Commit

Permalink
fix: swiper card width and overflow handling
Browse files Browse the repository at this point in the history
  • Loading branch information
wackerow committed Aug 24, 2024
1 parent 2b6da02 commit 6acde0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/components/SwiperCards/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ import "swiper/css/pagination"
const SwiperCards = ({ className }: ClassNameProp) => {
const { items } = useBentoBox()
return (
<div className={cn(className, "max-w-full")}>
<div
className={cn(
"-mx-4 w-[100vw] overflow-hidden px-4 sm:-mx-6 sm:px-6",
className
)}
>
<Title />
<Swiper
className="mx-auto mt-4 h-fit max-w-128"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const HomePage = ({
</div>

{/* Mobile */}
<SwiperCards className="my-16 lg:hidden" />
<SwiperCards className="lg:hidden" />

{/* Desktop */}
<BentoBox className="hidden lg:block" />
Expand Down

0 comments on commit 6acde0e

Please sign in to comment.