Skip to content

Commit

Permalink
Merge pull request #32 from Dium-dev/brands-carousel
Browse files Browse the repository at this point in the history
Add dark mode style
  • Loading branch information
JohanMejia77 authored Mar 15, 2024
2 parents 33655eb + 826dfb4 commit e85fe74
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/components/BrandsCarousel/Carousel.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"use client";
import Marquee from "react-fast-marquee";
import { useTheme } from "next-themes";

import { BrandCard } from "./BrandCard";

Expand All @@ -10,10 +11,18 @@ interface CarouselProps {
}

export const Carousel = ({ brands }: CarouselProps) => {
const { theme } = useTheme();

return (
<div className="flex items-center justify-between gap-x-1 ms:gap-x-2 px-2 group">
<Marquee direction={'left'} pauseOnHover speed={40} gradient gradientWidth={100}>
<Marquee
direction={"left"}
pauseOnHover
speed={40}
gradient
gradientWidth={100}
gradientColor={theme === "dark" ? "black" : "white"}
>
{brands.map((brand, i) => (
<BrandCard brand={brand} key={i} />
))}
Expand Down

0 comments on commit e85fe74

Please sign in to comment.