import React from 'react'; import { Button, Props as ButtonProps } from 'components/common/Button/Button'; import * as S from 'components/common/ActionComponent/ActionComponent.styled'; import { ActionComponentProps, getDefaultActionMessage, } from 'components/common/ActionComponent/ActionComponent'; import { useActionTooltip } from 'lib/hooks/useActionTooltip'; interface Props extends Omit, ButtonProps { canDoAction: boolean; } const ActionButton: React.FC = ({ placement = 'bottom-end', message = getDefaultActionMessage(), disabled, canDoAction, ...props }) => { const isDisabled = !canDoAction; const { x, y, reference, floating, strategy, open } = useActionTooltip( isDisabled, placement ); return (