mirror of https://github.com/langgenius/dify.git
fix display of preview
This commit is contained in:
parent
b6db6d9305
commit
7deaab116a
|
|
@ -62,10 +62,7 @@ const FormContentPreview: FC<FormContentPreviewProps> = ({
|
|||
}
|
||||
const placeholder = input.placeholder
|
||||
return (
|
||||
<Note
|
||||
placeholder={placeholder!}
|
||||
title={name}
|
||||
/>
|
||||
<Note placeholder={placeholder!} />
|
||||
)
|
||||
})(),
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -123,14 +123,11 @@ export const Variable: React.FC<{ path: string }> = ({ path }) => {
|
|||
)
|
||||
}
|
||||
|
||||
export const Note: React.FC<{ placeholder: FormInputItemPlaceholder, title: string }> = ({ placeholder, title }) => {
|
||||
export const Note: React.FC<{ placeholder: FormInputItemPlaceholder }> = ({ placeholder }) => {
|
||||
const isVariable = placeholder.type === 'variable'
|
||||
return (
|
||||
<>
|
||||
<h2>{title}</h2>
|
||||
<div className="mt-3 rounded-[10px] bg-components-input-bg-normal px-2.5 py-2">
|
||||
{isVariable ? <Variable path={`{{${placeholder.selector.join('.')}}}`} /> : <span>{placeholder.value}</span>}
|
||||
</div>
|
||||
</>
|
||||
<div className="mt-3 rounded-[10px] bg-components-input-bg-normal px-2.5 py-2">
|
||||
{isVariable ? <Variable path={`{{${placeholder.selector.join('.')}}}`} /> : <span>{placeholder.value}</span>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue