From fad1947ad20ddbb0ea5b32c9cbbb738faf47e256 Mon Sep 17 00:00:00 2001 From: Saxon Fletcher Date: Thu, 16 Jan 2025 20:11:31 +1000 Subject: [PATCH] style updates --- apps/www/components/RecipeDialog.tsx | 17 +- apps/www/pages/cookbook/index.tsx | 522 ++++++++++++++++++++++----- 2 files changed, 450 insertions(+), 89 deletions(-) diff --git a/apps/www/components/RecipeDialog.tsx b/apps/www/components/RecipeDialog.tsx index ffa2871bee2..7da6352f6b2 100644 --- a/apps/www/components/RecipeDialog.tsx +++ b/apps/www/components/RecipeDialog.tsx @@ -1,3 +1,4 @@ +import { Plus } from 'lucide-react' import { Button } from 'ui' import { Dialog, @@ -28,8 +29,11 @@ export default function RecipeDialog({ recipe, onClose }: RecipeDialogProps) { return ( !open && onClose()}> - -
+ +

{recipe.title}

{recipe.description}

@@ -41,17 +45,18 @@ export default function RecipeDialog({ recipe, onClose }: RecipeDialogProps) { navigator.clipboard.writeText(recipe.code) }} > - Copy to clipboard + Remix with Assistant -
-
+
diff --git a/apps/www/pages/cookbook/index.tsx b/apps/www/pages/cookbook/index.tsx index df9e8bf062e..8f5b219e174 100644 --- a/apps/www/pages/cookbook/index.tsx +++ b/apps/www/pages/cookbook/index.tsx @@ -4,10 +4,9 @@ import { NextSeo } from 'next-seo' import { motion } from 'framer-motion' import { Search, Database, Code, X } from 'lucide-react' -import { Button, Input } from 'ui' +import { Button, Input, Card, CardContent } from 'ui' import DefaultLayout from '~/components/Layouts/Default' import SectionContainer from '~/components/Layouts/SectionContainer' -import Panel from '~/components/Panel' import RecipeDialog from '~/components/RecipeDialog' import recipesData from '~/data/recipes.json' @@ -139,49 +138,419 @@ function CookbookPage() { description="Quickly add functionality to your existing project or spin up new projects based on an existing recipe." /> - -
- + + + Supabase Cookbook + +

+ Add functionality to your project +

+

+ Quickly add functionality to your existing project or spin up new projects based on an + existing recipe. +

+ } + size="large" + autoComplete="off" + type="search" + placeholder="Search recipes" + value={searchTerm} + onChange={(e) => setSearchTerm(e.target.value)} + className="w-full" + /> +
+ + + + + + + -

The Supabase cookbook

-

- Quickly add functionality to your existing project or spin up new projects based on - an existing recipe. -

-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
-
-
-
- } - size="small" - autoComplete="off" - type="search" - placeholder="Search recipes" - value={searchTerm} - onChange={(e) => setSearchTerm(e.target.value)} - className="w-full [&_input]:text-base [&_input]:md:text-sm [&_input]:!leading-4" - /> -
- -
- {selectedCategories.length > 0 && ( - - )} +
+ {/*
+
{recipes.map((category) => (
-
+
*/} -
- {filteredRecipes.map((category) => ( -
-
-

{category.title}

-

{category.description}

-
-
- {category.items.map((recipe) => ( - - ))} -
+ {filteredRecipes.map((category) => ( +
+
+

{category.title}

+

{category.description}

- ))} -
+
+ {category.items.map((recipe) => ( +
handleRecipeSelect(recipe)} + > +
+ {recipe.type === 'edge-function' ? ( + + ) : ( + + )} + {recipe.type} +
+
+

{recipe.title}

+

{recipe.description}

+
+
+ ))} +
+
+ ))}