From a26da28da388cd731462969a0bc72db4fdeb777d Mon Sep 17 00:00:00 2001 From: zhixian Date: Tue, 17 Feb 2026 01:38:38 +0900 Subject: [PATCH] feat: migrate DiffViewer + RecipeCard to shadcn components Co-Authored-By: Claude Opus 4.6 --- src/components/DiffViewer.tsx | 8 +++++--- src/components/RecipeCard.tsx | 37 +++++++++++++++++++++++------------ 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/src/components/DiffViewer.tsx b/src/components/DiffViewer.tsx index 88e4e61..ea02a73 100644 --- a/src/components/DiffViewer.tsx +++ b/src/components/DiffViewer.tsx @@ -1,7 +1,9 @@ +import { ScrollArea } from "@/components/ui/scroll-area"; + export function DiffViewer({ value }: { value: string }) { return ( -
-      {value}
-    
+ +
{value}
+
); } diff --git a/src/components/RecipeCard.tsx b/src/components/RecipeCard.tsx index 359047a..c18d68b 100644 --- a/src/components/RecipeCard.tsx +++ b/src/components/RecipeCard.tsx @@ -1,19 +1,30 @@ import type { Recipe } from "../lib/types"; +import { Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Button } from "@/components/ui/button"; export function RecipeCard({ recipe, onInstall }: { recipe: Recipe; onInstall: (id: string) => void }) { return ( -
-

{recipe.name}

-

{recipe.description}

-
- {recipe.tags.map((t) => ( - - {t} - - ))} -
-

Impact: {recipe.impactCategory}

- -
+ + + {recipe.name} + {recipe.description} + + +
+ {recipe.tags.map((t) => ( + + {t} + + ))} +
+

Impact: {recipe.impactCategory}

+
+ + + +
); }