update
This commit is contained in:
@@ -2,16 +2,23 @@ import React, {FC, MouseEventHandler, ReactElement} from 'react';
|
||||
import {Button, Tooltip} from '@fluentui/react-components';
|
||||
|
||||
export const ToolTipButton: FC<{
|
||||
text?: string | null, desc: string, icon?: ReactElement, onClick?: MouseEventHandler
|
||||
text?: string | null,
|
||||
desc: string,
|
||||
icon?: ReactElement,
|
||||
size?: 'small' | 'medium' | 'large',
|
||||
disabled?: boolean,
|
||||
onClick?: MouseEventHandler
|
||||
}> = ({
|
||||
text,
|
||||
desc,
|
||||
icon,
|
||||
size,
|
||||
disabled,
|
||||
onClick
|
||||
}) => {
|
||||
return (
|
||||
<Tooltip content={desc} showDelay={0} hideDelay={0} relationship="label">
|
||||
<Button icon={icon} onClick={onClick}>{text}</Button>
|
||||
<Button disabled={disabled} icon={icon} onClick={onClick} size={size}>{text}</Button>
|
||||
</Tooltip>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user