2024-10-21 10:32:37 +08:00
|
|
|
'use client'
|
|
|
|
import type { FC } from 'react'
|
|
|
|
import React from 'react'
|
|
|
|
import Tooltip from '@/app/components/base/tooltip'
|
|
|
|
|
2025-03-21 17:41:03 +08:00
|
|
|
export const Item: FC<{ title: string; tooltip: string; children: React.JSX.Element }> = ({
|
2024-10-21 10:32:37 +08:00
|
|
|
title,
|
|
|
|
tooltip,
|
|
|
|
children,
|
|
|
|
}) => {
|
|
|
|
return (
|
|
|
|
<div>
|
2025-03-21 17:41:03 +08:00
|
|
|
<div className='mb-1 flex items-center space-x-1'>
|
|
|
|
<div className='system-sm-semibold py-1 text-text-secondary'>{title}</div>
|
2024-10-21 10:32:37 +08:00
|
|
|
<Tooltip
|
|
|
|
popupContent={
|
2025-03-21 17:41:03 +08:00
|
|
|
<div className='system-sm-regular max-w-[200px] text-text-secondary'>{tooltip}</div>
|
2024-10-21 10:32:37 +08:00
|
|
|
}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
<div>{children}</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|