diff --git a/bun.lockb b/bun.lockb index 95aef60..87a6104 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 449e255..f6666da 100644 --- a/package.json +++ b/package.json @@ -36,6 +36,7 @@ }, "devDependencies": { "@notionhq/client": "^2.2.15", - "@tailwindcss/typography": "^0.5.15" + "@tailwindcss/typography": "^0.5.15", + "tailwind-scrollbar": "^3.1.0" } } diff --git a/src/components/Blogs.astro b/src/components/Blogs.astro index cecaaf8..29548ab 100644 --- a/src/components/Blogs.astro +++ b/src/components/Blogs.astro @@ -6,45 +6,44 @@ import { CardTitle, } from "@/components/ui/card"; import { getCollection } from "astro:content"; -import ScrollArea from "@/components/ScrollArea"; const blogs = await getCollection("database"); ---
-
+

Blogs

astro + notion

-
- -
- { - blogs.map((blog: any) => { - const slug = - blog.data.properties.Slug.rich_text[0].plain_text.replaceAll( - '"', - "" - ); - const title = blog.data.properties.Name.title[0].plain_text; - const description = - blog.data.properties.Description?.rich_text[0].plain_text; - - return ( - - - - {title} - - - {description} - - - +
+
+ { + blogs.map((blog: any) => { + const slug = + blog.data.properties.Slug.rich_text[0].plain_text.replaceAll( + '"', + "" ); - }) - } -
- + const title = blog.data.properties.Name.title[0].plain_text; + const description = + blog.data.properties.Description?.rich_text[0].plain_text; + + return ( + + + + {title} + + + {description} + + + + ); + }) + } +
diff --git a/src/components/ScrollArea.tsx b/src/components/ScrollArea.tsx deleted file mode 100644 index 398756b..0000000 --- a/src/components/ScrollArea.tsx +++ /dev/null @@ -1,18 +0,0 @@ -import { - ScrollArea as _ScrollArea, - ScrollBar, -} from "@/components/ui/scroll-area"; -import type { ReactNode } from "react"; - -export default function ScrollArea({ - children, -}: { - children: ReactNode | JSX.Element; -}) { - return ( - <_ScrollArea> - {children} - - - ); -} diff --git a/src/components/ui/scroll-area.tsx b/src/components/ui/scroll-area.tsx deleted file mode 100644 index cf253cf..0000000 --- a/src/components/ui/scroll-area.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import * as React from "react" -import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" - -import { cn } from "@/lib/utils" - -const ScrollArea = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, children, ...props }, ref) => ( - - - {children} - - - - -)) -ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName - -const ScrollBar = React.forwardRef< - React.ElementRef, - React.ComponentPropsWithoutRef ->(({ className, orientation = "vertical", ...props }, ref) => ( - - - -)) -ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName - -export { ScrollArea, ScrollBar } diff --git a/tailwind.config.mjs b/tailwind.config.mjs index 13221cc..9c94bd3 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -53,5 +53,9 @@ export default { }, }, }, - plugins: [require("@tailwindcss/typography"), require("tailwindcss-animate")], + plugins: [ + require("tailwindcss-animate"), + require("tailwind-scrollbar"), + require("@tailwindcss/typography"), + ], };