ソースを参照

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

Pika 11 ヶ月 前
コミット
2ee3a1b6f3

+ 1 - 1
web/app/components/base/prompt-editor/index.tsx

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

+ 3 - 1
web/app/components/workflow/nodes/http/components/key-value/key-value-edit/input-item.tsx

@@ -49,7 +49,7 @@ const InputItem: FC<Props> = ({
   }, [onRemove])
   }, [onRemove])
 
 
   return (
   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)
       {(!readOnly)
         ? (
         ? (
           <Input
           <Input
@@ -63,6 +63,7 @@ const InputItem: FC<Props> = ({
             onFocusChange={setIsFocus}
             onFocusChange={setIsFocus}
             placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
             placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
             placeholderClassName='!leading-[21px]'
             placeholderClassName='!leading-[21px]'
+            promptMinHeightClassName='h-full'
           />
           />
         )
         )
         : <div
         : <div
@@ -81,6 +82,7 @@ const InputItem: FC<Props> = ({
               onFocusChange={setIsFocus}
               onFocusChange={setIsFocus}
               placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
               placeholder={t('workflow.nodes.http.insertVarPlaceholder')!}
               placeholderClassName='!leading-[21px]'
               placeholderClassName='!leading-[21px]'
+              promptMinHeightClassName='h-full'
             />
             />
           )}
           )}
 
 

+ 3 - 3
web/app/components/workflow/nodes/http/components/key-value/key-value-edit/item.tsx

@@ -49,8 +49,8 @@ const KeyValueItem: FC<Props> = ({
 
 
   return (
   return (
     // group class name is for hover row show remove button
     // 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
         <InputItem
           instanceId={`http-key-${instanceId}`}
           instanceId={`http-key-${instanceId}`}
           nodeId={nodeId}
           nodeId={nodeId}
@@ -61,7 +61,7 @@ const KeyValueItem: FC<Props> = ({
           readOnly={readonly}
           readOnly={readonly}
         />
         />
       </div>
       </div>
-      <div className='w-1/2  h-full'>
+      <div className='w-1/2'>
         <InputItem
         <InputItem
           instanceId={`http-value-${instanceId}`}
           instanceId={`http-value-${instanceId}`}
           nodeId={nodeId}
           nodeId={nodeId}