import type {BaseButtonProps} from 'sentry/components/button'; import {Button} from 'sentry/components/button'; import Confirm from 'sentry/components/confirm'; import {Tooltip} from 'sentry/components/tooltip'; import {IconNot, IconPlay} from 'sentry/icons'; import {t} from 'sentry/locale'; import type {OpenConfirmOptions} from '../../../components/confirm'; export interface BlockButtonProps extends BaseButtonProps, Pick { hasAccess: boolean; isBlocked: boolean; onConfirm: () => void; } export function BlockButton({isBlocked, onConfirm, ...props}: BlockButtonProps) { const button = ( ); return ( {props.hasAccess ? ( button ) : ( {button} )} ); }