mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
Merge pull request #774 from RooVetGit/cte/shadcn-portals
This commit is contained in:
commit
686e3c77d4
3 changed files with 18 additions and 11 deletions
|
|
@ -5,7 +5,7 @@ import { cva, type VariantProps } from "class-variance-authority"
|
|||
import { cn } from "@/lib/utils"
|
||||
|
||||
const buttonVariants = cva(
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
||||
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-xs font-medium transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 cursor-pointer active:opacity-90",
|
||||
{
|
||||
variants: {
|
||||
variant: {
|
||||
|
|
@ -17,10 +17,10 @@ const buttonVariants = cva(
|
|||
link: "text-primary underline-offset-4 hover:underline",
|
||||
},
|
||||
size: {
|
||||
default: "h-9 px-4 py-2",
|
||||
sm: "h-8 rounded-md px-3 text-xs",
|
||||
lg: "h-10 rounded-md px-8",
|
||||
icon: "h-9 w-9",
|
||||
default: "h-7 px-3",
|
||||
sm: "h-6 px-2 text-sm",
|
||||
lg: "h-8 px-4 text-lg",
|
||||
icon: "h-7 w-7",
|
||||
},
|
||||
},
|
||||
defaultVariants: {
|
||||
|
|
|
|||
|
|
@ -53,9 +53,11 @@ DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayNam
|
|||
|
||||
const DropdownMenuContent = React.forwardRef<
|
||||
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
||||
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
|
||||
>(({ className, sideOffset = 4, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.Portal>
|
||||
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
|
||||
container?: HTMLElement
|
||||
}
|
||||
>(({ className, sideOffset = 4, container, ...props }, ref) => (
|
||||
<DropdownMenuPrimitive.Portal container={container}>
|
||||
<DropdownMenuPrimitive.Content
|
||||
ref={ref}
|
||||
sideOffset={sideOffset}
|
||||
|
|
@ -79,7 +81,7 @@ const DropdownMenuItem = React.forwardRef<
|
|||
<DropdownMenuPrimitive.Item
|
||||
ref={ref}
|
||||
className={cn(
|
||||
"relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",
|
||||
"relative flex cursor-pointer select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0 active:opacity-90",
|
||||
inset && "pl-8",
|
||||
className,
|
||||
)}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,11 @@
|
|||
@plugin "tailwindcss-animate";
|
||||
|
||||
@theme {
|
||||
--font-display: var(--vscode-font-family);
|
||||
--text-sm: calc(var(--vscode-font-size) * 0.9);
|
||||
--text-base: var(--vscode-font-size);
|
||||
--text-lg: calc(var(--vscode-font-size) * 1.1);
|
||||
|
||||
--color-background: var(--background);
|
||||
--color-foreground: var(--foreground);
|
||||
--color-card: var(--card);
|
||||
|
|
@ -65,11 +70,11 @@
|
|||
--secondary-foreground: var(--vscode-button-secondaryForeground);
|
||||
--muted: var(--vscode-disabledForeground);
|
||||
--muted-foreground: var(--vscode-descriptionForeground);
|
||||
--accent: var(--vscode-input-border);
|
||||
--accent: var(--vscode-list-hoverBackground);
|
||||
--accent-foreground: var(--vscode-button-foreground);
|
||||
--destructive: var(--vscode-errorForeground);
|
||||
--destructive-foreground: var(--vscode-button-foreground);
|
||||
--border: var(--vscode-widget-border);
|
||||
--border: var(--vscode-input-border);
|
||||
--input: var(--vscode-input-background);
|
||||
--ring: var(--vscode-input-border);
|
||||
--chart-1: var(--vscode-charts-red);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue