intermittent commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import type { ReactNode } from "react";
|
||||
import HoverTooltip from "./HoverTooltip";
|
||||
|
||||
export type DisabledActionTooltipProps = {
|
||||
reason?: ReactNode;
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export default function DisabledActionTooltip({ reason, children, className = "" }: DisabledActionTooltipProps) {
|
||||
if (!reason) return <>{children}</>;
|
||||
return (
|
||||
<HoverTooltip
|
||||
content={reason}
|
||||
tone="danger"
|
||||
className={`disabled-action-tooltip ${className}`.trim()}
|
||||
triggerTabIndex={0}>
|
||||
{children}
|
||||
</HoverTooltip>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user