fix: styles of border and copy
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user