feat: add role tooltip and fix add prompt error

This commit is contained in:
Joel
2024-03-06 18:36:35 +08:00
parent 5a27a95f8d
commit 0529c3d5d2
5 changed files with 25 additions and 6 deletions

View File

@ -56,7 +56,7 @@ const Editor: FC<Props> = ({
return (
<div className={cn(wrapClassName)}>
<div ref={ref} className={cn(isFocus && s.gradientBorder, isExpand && 'h-full', '!rounded-[9px] shadow-md')}>
<div ref={ref} className={cn(isFocus && s.gradientBorder, isExpand && 'h-full', '!rounded-[9px]')}>
<div className={cn(isFocus ? 'bg-white' : 'bg-gray-100', isExpand && 'h-full flex flex-col', 'rounded-lg')}>
<div className='pt-1 pl-3 pr-2 flex justify-between h-6 items-center'>
<div className='leading-4 text-xs font-semibold text-gray-700 uppercase'>{title}</div>

View File

@ -16,6 +16,7 @@ type Props = {
onChange: (value: any) => void
uppercase?: boolean
popupClassName?: string
triggerClassName?: string
itemClassName?: string
readonly?: boolean
showChecked?: boolean
@ -27,6 +28,7 @@ const TypeSelector: FC<Props> = ({
value,
onChange,
uppercase,
triggerClassName,
popupClassName,
itemClassName,
readonly,
@ -52,7 +54,7 @@ const TypeSelector: FC<Props> = ({
<div
onClick={toggleShow}
className={cn(showOption && 'bg-black/5', 'flex items-center h-5 pl-1 pr-0.5 rounded-md text-xs font-semibold text-gray-700 cursor-pointer hover:bg-black/5')}>
<div className={cn('text-sm font-semibold', uppercase && 'uppercase')}>{item?.label}</div>
<div className={cn(triggerClassName, 'text-sm font-semibold', uppercase && 'uppercase')}>{item?.label}</div>
<ChevronSelectorVertical className='w-3 h-3 ' />
</div>
)}