From 8cd0d5c257a32c0f036c88b9a8aa5c8ac86c7519 Mon Sep 17 00:00:00 2001 From: shadcn Date: Mon, 13 Feb 2023 22:00:57 +0400 Subject: [PATCH] fix(example): some a11y improvements --- .../playground/app/(playground)/layout.tsx | 4 ++- examples/playground/app/(playground)/page.tsx | 9 ++++-- .../components/maxlength-selector.tsx | 31 ++++++++++--------- .../playground/components/model-selector.tsx | 3 +- .../playground/components/preset-selector.tsx | 1 + .../components/temperature-selector.tsx | 31 ++++++++++--------- .../playground/components/top-p-selector.tsx | 31 ++++++++++--------- 7 files changed, 64 insertions(+), 46 deletions(-) diff --git a/examples/playground/app/(playground)/layout.tsx b/examples/playground/app/(playground)/layout.tsx index 92d22e8815..a0293e339f 100644 --- a/examples/playground/app/(playground)/layout.tsx +++ b/examples/playground/app/(playground)/layout.tsx @@ -3,6 +3,7 @@ import { HelpCircle, Zap } from "lucide-react" import { workspaces } from "@/data/teams" import { user } from "@/data/user" +import { siteConfig } from "@/config/site" import { cn } from "@/lib/utils" import { Icons } from "@/components/icons" import { MainNav } from "@/components/main-nav" @@ -21,6 +22,7 @@ export default function DashboardLayout({ children }: DashboardLayoutProps) {
+ {siteConfig.name}
@@ -29,7 +31,7 @@ export default function DashboardLayout({ children }: DashboardLayoutProps) { href="/login" className={cn( buttonVariants({ variant: "ghost" }), - "h-9 px-2 text-emerald-600" + "h-9 px-2 text-emerald-700" )} > Upgrade diff --git a/examples/playground/app/(playground)/page.tsx b/examples/playground/app/(playground)/page.tsx index 1265fbaf89..d4e9aaa3d4 100644 --- a/examples/playground/app/(playground)/page.tsx +++ b/examples/playground/app/(playground)/page.tsx @@ -100,8 +100,10 @@ export default function PlaygroundPage() {
- - Mode + + + Mode + Choose the interface that best suits your task. You can @@ -112,12 +114,15 @@ export default function PlaygroundPage() { + Complete + Insert + Edit diff --git a/examples/playground/components/maxlength-selector.tsx b/examples/playground/components/maxlength-selector.tsx index d8f9aab26b..2442865a0d 100644 --- a/examples/playground/components/maxlength-selector.tsx +++ b/examples/playground/components/maxlength-selector.tsx @@ -21,21 +21,24 @@ export function MaxLengthSelector({ defaultValue }: MaxLengthSelectorProps) { return (
- -
- - - {value} - + +
+
+ + + {value} + +
+
-
- + {selectedModel ? selectedModel.name : "Select a model..."} diff --git a/examples/playground/components/preset-selector.tsx b/examples/playground/components/preset-selector.tsx index 8fcf734b18..351b69bc3e 100644 --- a/examples/playground/components/preset-selector.tsx +++ b/examples/playground/components/preset-selector.tsx @@ -37,6 +37,7 @@ export function PresetSelector({ presets, ...props }: PresetSelectorProps) {