You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
542 B
27 lines
542 B
import { Tooltip } from 'antd'; |
|
import dynamic from 'next/dynamic'; |
|
import { FC } from 'react'; |
|
|
|
// Lazy loaded components |
|
|
|
const InfoCircleOutlined = dynamic(() => import('@ant-design/icons/InfoCircleOutlined'), { |
|
ssr: false, |
|
}); |
|
|
|
export type InfoTipProps = { |
|
tip: string | null; |
|
}; |
|
|
|
export const InfoTip: FC<InfoTipProps> = ({ tip }) => { |
|
if (tip === '' || tip === null) { |
|
return null; |
|
} |
|
|
|
return ( |
|
<span className="info-tip"> |
|
<Tooltip title={tip}> |
|
<InfoCircleOutlined /> |
|
</Tooltip> |
|
</span> |
|
); |
|
};
|
|
|