Feat: workflow dark mode (#17785)
This commit is contained in:
@@ -68,8 +68,8 @@ const ImportFromTool: FC<Props> = ({
|
||||
return (
|
||||
<div>
|
||||
<div className={cn(
|
||||
'flex h-6 cursor-pointer items-center rounded-md px-2 text-xs font-medium text-gray-500 hover:bg-gray-100',
|
||||
open && 'bg-gray-100',
|
||||
'flex h-6 cursor-pointer items-center rounded-md px-2 text-xs font-medium text-text-tertiary hover:bg-state-base-hover',
|
||||
open && 'bg-state-base-hover',
|
||||
)}>
|
||||
{t(`${i18nPrefix}.importFromTool`)}
|
||||
</div>
|
||||
|
@@ -24,36 +24,33 @@ const Item: FC<Props> = ({
|
||||
const { t } = useTranslation()
|
||||
|
||||
return (
|
||||
<div className='group relative rounded-lg border-[0.5px] border-gray-200 bg-white px-2.5 py-2 hover:shadow-xs'>
|
||||
<div className='group relative rounded-lg bg-components-input-bg-normal px-2.5 py-2 hover:shadow-xs'>
|
||||
<div className='flex justify-between'>
|
||||
<div className='flex items-center'>
|
||||
<Variable02 className='h-3.5 w-3.5 text-primary-500' />
|
||||
<div className='ml-1 text-[13px] font-medium text-gray-900'>{payload.name}</div>
|
||||
<div className='ml-2 text-xs font-normal capitalize text-gray-500'>{payload.type}</div>
|
||||
<Variable02 className='h-3.5 w-3.5 text-text-accent-secondary' />
|
||||
<div className='ml-1 text-[13px] font-medium text-text-primary'>{payload.name}</div>
|
||||
<div className='ml-2 text-xs font-normal capitalize text-text-tertiary'>{payload.type}</div>
|
||||
</div>
|
||||
{payload.required && (
|
||||
<div className='text-xs font-normal uppercase leading-4 text-gray-500'>{t(`${i18nPrefix}.addExtractParameterContent.required`)}</div>
|
||||
<div className='text-xs font-normal uppercase leading-4 text-text-tertiary'>{t(`${i18nPrefix}.addExtractParameterContent.required`)}</div>
|
||||
)}
|
||||
</div>
|
||||
<div className='mt-0.5 text-xs font-normal leading-[18px] text-gray-500'>{payload.description}</div>
|
||||
<div className='mt-0.5 text-xs font-normal leading-[18px] text-text-tertiary'>{payload.description}</div>
|
||||
<div
|
||||
className='absolute right-1 top-0 hidden h-full w-[119px] items-center justify-end space-x-1 rounded-lg group-hover:flex'
|
||||
style={{
|
||||
background: 'linear-gradient(270deg, #FFF 49.99%, rgba(255, 255, 255, 0.00) 98.1%)',
|
||||
}}
|
||||
className='absolute right-0 top-0 hidden h-full w-[119px] items-center justify-end space-x-1 rounded-lg bg-gradient-to-l from-components-panel-on-panel-item-bg to-background-gradient-mask-transparent pr-1 group-hover:flex'
|
||||
>
|
||||
<div
|
||||
className='cursor-pointer rounded-md p-1 hover:bg-black/5'
|
||||
className='cursor-pointer rounded-md p-1 hover:bg-state-base-hover'
|
||||
onClick={onEdit}
|
||||
>
|
||||
<RiEditLine className='h-4 w-4 text-gray-500' />
|
||||
<RiEditLine className='h-4 w-4 text-text-tertiary' />
|
||||
</div>
|
||||
|
||||
<div
|
||||
className='cursor-pointer rounded-md p-1 hover:bg-black/5'
|
||||
className='group shrink-0 cursor-pointer rounded-md p-1 hover:!bg-state-destructive-hover'
|
||||
onClick={onDelete}
|
||||
>
|
||||
<RiDeleteBinLine className='h-4 w-4 text-gray-500' />
|
||||
<RiDeleteBinLine className='h-4 w-4 text-text-tertiary group-hover:text-text-destructive' />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -146,7 +146,7 @@ const AddExtractParameter: FC<Props> = ({
|
||||
<Select
|
||||
defaultValue={param.type}
|
||||
allowSearch={false}
|
||||
bgClassName='bg-gray-100'
|
||||
// bgClassName='bg-gray-100'
|
||||
onSelect={v => handleParamChange('type')(v.value)}
|
||||
optionClassName='capitalize'
|
||||
items={
|
||||
@@ -171,7 +171,7 @@ const AddExtractParameter: FC<Props> = ({
|
||||
</Field>
|
||||
<Field title={t(`${i18nPrefix}.addExtractParameterContent.required`)}>
|
||||
<>
|
||||
<div className='mb-1.5 text-xs font-normal leading-[18px] text-gray-500'>{t(`${i18nPrefix}.addExtractParameterContent.requiredContent`)}</div>
|
||||
<div className='mb-1.5 text-xs font-normal leading-[18px] text-text-tertiary'>{t(`${i18nPrefix}.addExtractParameterContent.requiredContent`)}</div>
|
||||
<Switch size='l' defaultValue={param.required} onChange={handleParamChange('required')} />
|
||||
</>
|
||||
</Field>
|
||||
|
@@ -164,7 +164,7 @@ const Panel: FC<NodePanelProps<ParameterExtractorNodeType>> = ({
|
||||
{!readOnly && (
|
||||
<ImportFromTool onImport={handleImportFromTool} />
|
||||
)}
|
||||
{!readOnly && (<div className='h-3 w-px bg-gray-200'></div>)}
|
||||
{!readOnly && (<div className='h-3 w-px bg-divider-regular'></div>)}
|
||||
<AddExtractParameter type='add' onSave={addExtractParameter} />
|
||||
</div>
|
||||
)
|
||||
|
Reference in New Issue
Block a user