2023-05-05 23:23:34 +08:00
|
|
|
import React, {FC, ReactElement} from 'react';
|
|
|
|
import {Button, Tooltip} from '@fluentui/react-components';
|
|
|
|
|
2023-05-06 21:32:14 +08:00
|
|
|
export const ToolTipButton: FC<{ text?: string, desc: string, icon?: ReactElement }> = ({text, desc, icon}) => {
|
2023-05-05 23:23:34 +08:00
|
|
|
return (
|
|
|
|
<Tooltip content={desc} showDelay={0} hideDelay={0} relationship="label">
|
2023-05-06 21:32:14 +08:00
|
|
|
<Button icon={icon}>{text}</Button>
|
2023-05-05 23:23:34 +08:00
|
|
|
</Tooltip>
|
|
|
|
);
|
|
|
|
};
|