chore: start input placeholder and bg

This commit is contained in:
Joel 2024-04-03 11:41:44 +08:00
parent 00d9c48461
commit f291aec2cd
5 changed files with 8 additions and 5 deletions

View File

@ -25,13 +25,12 @@ export type IConfigModalProps = {
onConfirm: (newValue: InputVar, moreInfo?: MoreInfo) => void
}
const inputClassName = 'w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-50 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
const inputClassName = 'w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-100 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200'
const ConfigModal: FC<IConfigModalProps> = ({
isCreate,
payload,
isShow,
varKeys = [],
onClose,
onConfirm,
}) => {
@ -151,14 +150,16 @@ const ConfigModal: FC<IConfigModalProps> = ({
value={variable}
onChange={e => handlePayloadChange('variable')(e.target.value)}
onBlur={handleVarKeyBlur}
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
/>
</Field>
<Field title={t('appDebug.variableConig.labelName')}>
<input
type='text'
className={inputClassName}
value={label}
value={label as string}
onChange={e => handlePayloadChange('label')(e.target.value)}
placeholder={t('appDebug.variableConig.inputPlaceholder')!}
/>
</Field>

View File

@ -36,7 +36,7 @@ const ConfigString: FC<IConfigStringProps> = ({
onChange(value)
}}
className="w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-50 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200"
className="w-full px-3 text-sm leading-9 text-gray-900 border-0 rounded-lg grow h-9 bg-gray-100 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-gray-200"
/>
</div>
)

View File

@ -46,7 +46,7 @@ const VarItem: FC<Props> = ({
<Variable02 className='w-3.5 h-3.5 text-primary-500' />
<div title={payload.variable} className='shrink-0 max-w-[130px] truncate text-[13px] font-medium text-gray-700'>{payload.variable}</div>
{payload.label && (<><div className='shrink-0 text-xs font-medium text-gray-400'>·</div>
<div title={payload.label} className='max-w-[130px] truncate text-[13px] font-medium text-gray-500'>{payload.label}</div>
<div title={payload.label as string} className='max-w-[130px] truncate text-[13px] font-medium text-gray-500'>{payload.label as string}</div>
</>)}
</div>
<div className='shrink-0 ml-2 flex items-center'>

View File

@ -283,6 +283,7 @@ const translation = {
'apiBasedVar': 'API-based Variable',
'varName': 'Variable Name',
'labelName': 'Label Name',
'inputPlaceholder': 'Please input',
'required': 'Required',
'errorMsg': {
varNameRequired: 'Variable name is required',

View File

@ -278,6 +278,7 @@ const translation = {
'addOption': '添加选项',
'apiBasedVar': '基于 API 的变量',
'varName': '变量名称',
'inputPlaceholder': '请输入',
'labelName': '显示名称',
'required': '必填',
'errorMsg': {