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 ( 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} />}

View File

@ -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'
/> />
)} )}

View File

@ -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={cn(className, 'group flex h-min-7 border-t border-gray-200')}>
<div className='w-1/2 h-full border-r 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}