fix: styles of border and copy
This commit is contained in:
@@ -49,9 +49,9 @@ export function BaseNode({
|
||||
return (
|
||||
<div
|
||||
className={cn(
|
||||
"bg-card text-card-foreground relative rounded-md border",
|
||||
"bg-card text-card-foreground relative rounded-md border transition-[border-color,box-shadow] duration-200",
|
||||
"hover:ring-1",
|
||||
selected && "border-primary shadow-[0_0_0_2px_hsl(var(--primary)_/_0.4)]",
|
||||
selected && "border-primary/70 shadow-[0_0_0_2px_hsl(var(--primary)_/_0.22)]",
|
||||
className,
|
||||
)}
|
||||
data-selected={selected}
|
||||
|
||||
@@ -32,6 +32,7 @@ import { Input } from '../ui/input'
|
||||
import { Button } from '../ui/button'
|
||||
import { ToggleGroup, ToggleGroupItem } from '../ui/toggle-group'
|
||||
import { useTheme } from '../../lib/themeContext'
|
||||
import { toast } from 'sonner'
|
||||
|
||||
export type RenderingNodeData = {
|
||||
viewportWidth?: number
|
||||
@@ -759,7 +760,9 @@ function RenderingNodeComponent({ id, data, width, height, selected }: Props) {
|
||||
className="absolute top-2 right-2 z-10 h-7 w-7 shrink-0 rounded-md shadow-sm"
|
||||
onClick={() => {
|
||||
const text = resolvedContent ?? ''
|
||||
if (text) navigator.clipboard?.writeText(text).catch(() => {})
|
||||
if (text) {
|
||||
navigator.clipboard?.writeText(text).then(() => toast.success('Copied to clipboard')).catch(() => {})
|
||||
}
|
||||
}}
|
||||
disabled={!resolvedContent}
|
||||
title="Copy raw output"
|
||||
|
||||
@@ -32,12 +32,12 @@ body {
|
||||
}
|
||||
|
||||
.react-flow__node:focus-visible>div:first-child {
|
||||
border-color: hsl(var(--primary));
|
||||
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.4);
|
||||
border-color: hsl(var(--primary) / 0.7);
|
||||
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.22);
|
||||
}
|
||||
|
||||
.dark .react-flow__node:focus-visible>div:first-child {
|
||||
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.5);
|
||||
box-shadow: 0 0 0 2px hsl(var(--primary) / 0.28);
|
||||
}
|
||||
|
||||
.react-flow__node .react-flow__handle {
|
||||
|
||||
Reference in New Issue
Block a user