reset confirm for completion page
This commit is contained in:
@@ -13,17 +13,22 @@ import { ToolTipButton } from './ToolTipButton';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
|
||||
export const DialogButton: FC<{
|
||||
icon: ReactElement,
|
||||
tooltip: string,
|
||||
text?: string | null
|
||||
icon?: ReactElement,
|
||||
tooltip?: string | null,
|
||||
className?: string,
|
||||
title: string,
|
||||
contentText: string,
|
||||
onConfirm: () => void
|
||||
}> = ({ tooltip, icon, title, contentText, onConfirm }) => {
|
||||
}> = ({ text, icon, tooltip, className, title, contentText, onConfirm }) => {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return <Dialog>
|
||||
<DialogTrigger disableButtonEnhancement>
|
||||
<ToolTipButton desc={tooltip} icon={icon} />
|
||||
{tooltip ?
|
||||
<ToolTipButton className={className} desc={tooltip} text={text} icon={icon} /> :
|
||||
<Button className={className} icon={icon}>{text}</Button>
|
||||
}
|
||||
</DialogTrigger>
|
||||
<DialogSurface>
|
||||
<DialogBody>
|
||||
|
||||
@@ -5,6 +5,7 @@ export const ToolTipButton: FC<{
|
||||
text?: string | null,
|
||||
desc: string,
|
||||
icon?: ReactElement,
|
||||
className?: string,
|
||||
size?: 'small' | 'medium' | 'large',
|
||||
shape?: 'rounded' | 'circular' | 'square';
|
||||
appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';
|
||||
@@ -14,6 +15,7 @@ export const ToolTipButton: FC<{
|
||||
text,
|
||||
desc,
|
||||
icon,
|
||||
className,
|
||||
size,
|
||||
shape,
|
||||
appearance,
|
||||
@@ -22,7 +24,7 @@ export const ToolTipButton: FC<{
|
||||
}) => {
|
||||
return (
|
||||
<Tooltip content={desc} showDelay={0} hideDelay={0} relationship="label">
|
||||
<Button disabled={disabled} icon={icon} onClick={onClick} size={size} shape={shape}
|
||||
<Button className={className} disabled={disabled} icon={icon} onClick={onClick} size={size} shape={shape}
|
||||
appearance={appearance}>{text}</Button>
|
||||
</Tooltip>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user