From 1ea9d44c909b82040f4dc132c58bca304052389a Mon Sep 17 00:00:00 2001 From: Simon Farshid Date: Thu, 20 Jun 2024 18:35:32 -0700 Subject: [PATCH] fix: tailwind.config.ts paths (#269) --- apps/www/tailwind.config.ts | 4 ++-- packages/shadcn-registry/package.json | 2 +- .../registry/assistant-ui/assistant-modal.tsx | 17 ++++++++++------- pnpm-lock.yaml | 13 +++++++++++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/apps/www/tailwind.config.ts b/apps/www/tailwind.config.ts index 288ff9ef6..6969367f0 100644 --- a/apps/www/tailwind.config.ts +++ b/apps/www/tailwind.config.ts @@ -6,8 +6,8 @@ const config = { "./app/**/*.{ts,tsx,mdx}", "./pages/**/*.{ts,tsx,mdx}", "./components/**/*.{ts,tsx,mdx}", - "../../packages/cli/components/**/*.{ts,tsx,mdx}", - "../../packages/cli/registry/**/*.{ts,tsx,mdx}", + "../../packages/shadcn-registry/components/**/*.{ts,tsx,mdx}", + "../../packages/shadcn-registry/registry/**/*.{ts,tsx,mdx}", "./theme.config.tsx", ], prefix: "", diff --git a/packages/shadcn-registry/package.json b/packages/shadcn-registry/package.json index 41d212ea3..1e34ecb0b 100644 --- a/packages/shadcn-registry/package.json +++ b/packages/shadcn-registry/package.json @@ -4,7 +4,6 @@ "private": true, "license": "MIT", "type": "module", - "dependencies": {}, "devDependencies": { "@assistant-ui/react": "workspace:*", "@assistant-ui/react-markdown": "workspace:*", @@ -19,6 +18,7 @@ "@types/react-syntax-highlighter": "^15.5.13", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "eslint": "^8", "lucide-react": "^0.395.0", "react": "^18.3.1", "react-resizable-panels": "^2.0.19", diff --git a/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx b/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx index 7fe7c2043..6bac61ac3 100644 --- a/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx +++ b/packages/shadcn-registry/registry/assistant-ui/assistant-modal.tsx @@ -16,7 +16,7 @@ import { } from "@/components/ui/tooltip"; import { cn } from "@/lib/utils"; import { TooltipProvider } from "@radix-ui/react-tooltip"; -import { type FC, useState } from "react"; +import { useState, forwardRef } from "react"; export const AssistantModal = () => { const [open, setOpen] = useState(false); @@ -39,10 +39,10 @@ export const AssistantModal = () => { type FloatingAssistantButtonProps = { "data-state"?: "open" | "closed" }; -const FloatingAssistantButton: FC = ({ - "data-state": state, - ...rest -}) => { +const FloatingAssistantButton = forwardRef< + HTMLButtonElement, + FloatingAssistantButtonProps +>(({ "data-state": state, ...rest }, ref) => { const tooltip = state === "open" ? "Close Assistant" : "Open Assistant"; return ( @@ -51,8 +51,9 @@ const FloatingAssistantButton: FC = ({