fix: key-value-table styles (#4678)

This commit is contained in:
Pika 2024-05-28 10:57:40 +08:00 committed by GitHub
parent 0960b17fbc
commit 2ee3a1b6f3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 7 additions and 5 deletions

View File

@ -142,7 +142,7 @@ const PromptEditor: FC<PromptEditorProps> = ({
return (
<LexicalComposer initialConfig={{ ...initialConfig, editable }}>
<div className='relative'>
<div className='relative h-full'>
<RichTextPlugin
contentEditable={<ContentEditable className={`${className} outline-none ${compact ? 'leading-5 text-[13px]' : 'leading-6 text-sm'} text-gray-700`} style={style || {}} />}
placeholder={<Placeholder value={placeholder} className={placeholderClassName} compact={compact} />}

View File

@ -49,7 +49,7 @@ const InputItem: FC<Props> = ({
}, [onRemove])
return (
<div className={cn(className, 'hover:bg-gray-50 hover:cursor-text', 'relative flex h-full items-center')}>
<div className={cn(className, 'hover:bg-gray-50 hover:cursor-text', 'relative flex h-full')}>
{(!readOnly)
? (
<Input
@ -63,6 +63,7 @@ const InputItem: FC<Props> = ({
onFocusChange={setIsFocus}
placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
placeholderClassName='!leading-[21px]'
promptMinHeightClassName='h-full'
/>
)
: <div
@ -81,6 +82,7 @@ const InputItem: FC<Props> = ({
onFocusChange={setIsFocus}
placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
placeholderClassName='!leading-[21px]'
promptMinHeightClassName='h-full'
/>
)}

View File

@ -49,8 +49,8 @@ const KeyValueItem: FC<Props> = ({
return (
// group class name is for hover row show remove button
<div className={cn(className, 'group flex items-start h-min-7 border-t border-gray-200')}>
<div className='w-1/2 h-full border-r border-gray-200'>
<div className={cn(className, 'group flex h-min-7 border-t border-gray-200')}>
<div className='w-1/2 border-r border-gray-200'>
<InputItem
instanceId={`http-key-${instanceId}`}
nodeId={nodeId}
@ -61,7 +61,7 @@ const KeyValueItem: FC<Props> = ({
readOnly={readonly}
/>
</div>
<div className='w-1/2 h-full'>
<div className='w-1/2'>
<InputItem
instanceId={`http-value-${instanceId}`}
nodeId={nodeId}