mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 09:58:04 +08:00
feat: template transform code tooltip
This commit is contained in:
@ -42,8 +42,8 @@ const Base: FC<Props> = ({
|
||||
return (
|
||||
<div className={cn(className, 'rounded-lg border', isFocus ? 'bg-white border-gray-200' : 'bg-gray-100 border-gray-100')}>
|
||||
<div className='flex justify-between items-center h-7 pt-1 pl-3 pr-1'>
|
||||
<div className=''>{title}</div>
|
||||
<div className='flex'>
|
||||
<div className='text-xs font-semibold text-gray-700'>{title}</div>
|
||||
<div className='flex items-center'>
|
||||
{headerRight}
|
||||
{!isCopied
|
||||
? (
|
||||
|
||||
@ -7,12 +7,14 @@ type Props = {
|
||||
value: string
|
||||
onChange: (value: string) => void
|
||||
title: JSX.Element
|
||||
headerRight?: JSX.Element
|
||||
}
|
||||
|
||||
const CodeEditor: FC<Props> = ({
|
||||
value,
|
||||
onChange,
|
||||
title,
|
||||
headerRight,
|
||||
}) => {
|
||||
const [isFocus, setIsFocus] = React.useState(false)
|
||||
|
||||
@ -21,6 +23,7 @@ const CodeEditor: FC<Props> = ({
|
||||
<Base
|
||||
title={title}
|
||||
value={value}
|
||||
headerRight={headerRight}
|
||||
isFocus={isFocus}
|
||||
minHeight={86}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user