diff --git a/src/components/SectionGridAuthorBox.tsx b/src/components/SectionGridAuthorBox.tsx new file mode 100644 index 0000000..23ad1a7 --- /dev/null +++ b/src/components/SectionGridAuthorBox.tsx @@ -0,0 +1,54 @@ +import CardAuthorBox from "@/components/CardAuthorBox"; +import CardAuthorBox2 from "@/components/CardAuthorBox2"; +import Heading from "@/shared/Heading"; +import { DEMO_AUTHORS } from "@/data/authors"; +import { AuthorType } from "@/data/types"; +import React, { FC } from "react"; +import ButtonPrimary from "@/shared/ButtonPrimary"; +import ButtonSecondary from "@/shared/ButtonSecondary"; + +export interface SectionGridAuthorBoxProps { + className?: string; + authors?: AuthorType[]; + boxCard?: "box1" | "box2"; + gridClassName?: string; +} + +const DEMO_DATA = DEMO_AUTHORS.filter((_, i) => i < 10); + +const SectionGridAuthorBox: FC = ({ + className = "", + authors = DEMO_DATA, + boxCard = "box1", + gridClassName = "grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5 ", +}) => { + return ( +
+ + Top 10 author of the month + +
+ {authors.map((author, index) => + boxCard === "box2" ? ( + + ) : ( + + ) + )} +
+
+ Show me more + Become a host +
+
+ ); +}; + +export default SectionGridAuthorBox;