mirror of
https://github.com/owncast/owncast.git
synced 2024-12-22 09:14:47 +03:00
27 lines
542 B
TypeScript
27 lines
542 B
TypeScript
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>
|
|
);
|
|
};
|