Skip to content

Commit b084d76

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 702bed5 + 3ab4688 commit b084d76

File tree

1 file changed

+27
-10
lines changed

1 file changed

+27
-10
lines changed

packages/ui/src/PluginUI/InputTitle.tsx

+27-10
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,46 @@ export function InputTitle({
2020
const [isMouseOver, setIsMouseOver] = useState(false)
2121
return (
2222
<div
23-
className='w-[100px] flex items-center flex-shrink-0 gap-1'
23+
className='w-[105px] flex items-center flex-shrink-0 gap-0.5'
2424
style={{ fontFamily: 'Inter Medium' }}
2525
>
26-
<p className='font-medium whitespace-nowrap'>
26+
<p className='font-medium whitespace-nowrap user-select-none'>
2727
{condition === true && <span className='opacity-30'></span>}
2828
{title}
2929
</p>
3030
{info === true && (
3131
<div
32-
className='flex items-center w-2 h-2 bg-[blue] gap-2 relative'
32+
className='flex items-center justify-center relative w-fit h-fit p-0.5 cursor-pointer'
3333
onMouseOver={() => setIsMouseOver(true)}
3434
onMouseLeave={() => setIsMouseOver(false)}
3535
>
36-
<div
37-
className={
38-
'absolute text-[white] p-4 bg-[red] ' +
39-
(isMouseOver === true ? 'opacity-100' : 'opacity-0')
40-
}
36+
<svg
37+
xmlns='http://www.w3.org/2000/svg'
38+
width='16'
39+
height='16'
40+
fill='#000000'
41+
viewBox='0 0 256 256'
42+
className='opacity-30'
4143
>
42-
{infoContent}
44+
<path d='M144,180a16,16,0,1,1-16-16A16,16,0,0,1,144,180Zm92-52A108,108,0,1,1,128,20,108.12,108.12,0,0,1,236,128Zm-24,0a84,84,0,1,0-84,84A84.09,84.09,0,0,0,212,128ZM128,64c-24.26,0-44,17.94-44,40v4a12,12,0,0,0,24,0v-4c0-8.82,9-16,20-16s20,7.18,20,16-9,16-20,16a12,12,0,0,0-12,12v8a12,12,0,0,0,23.73,2.56C158.31,137.88,172,122.37,172,104,172,81.94,152.26,64,128,64Z'></path>
45+
</svg>
46+
</div>
47+
)}
48+
{info === true && (
49+
<div
50+
className={
51+
'w-fit h-fit absolute z-20 min-w-[140px] pointer-events-none duration-300 ' +
52+
(isMouseOver === true
53+
? 'opacity-100 bottom-7'
54+
: 'opacity-0 bottom-6')
55+
}
56+
>
57+
<div className='absolute w-full h-full bg-[#ff340a] z-0 rounded-md opacity-80'>
58+
{/* tooltip */}
59+
<div className='bg-[#ff340a] absolute w-3 h-3 rotate-45 rounded-sm bottom-[-4px] left-[12px]'></div>
4360
</div>
61+
<p className='relative z-20 p-2 text-white'>{infoContent}</p>
4462
</div>
45-
// <HoverMessage content={infoContent} isHovered={isMouseOver} />
4663
)}
4764
</div>
4865
)

0 commit comments

Comments
 (0)