import {Component} from 'react'; import Button, {ButtonPropsWithoutAriaLabel} from 'sentry/components/button'; import Tooltip from 'sentry/components/tooltip'; import {t} from 'sentry/locale'; import {IntegrationWithConfig} from 'sentry/types'; import AddIntegration from './addIntegration'; interface AddIntegrationButtonProps extends Omit, Pick< React.ComponentProps, 'provider' | 'organization' | 'analyticsParams' | 'modalParams' > { onAddIntegration: (data: IntegrationWithConfig) => void; buttonText?: string; reinstall?: boolean; } export default class AddIntegrationButton extends Component { render() { const { provider, buttonText, onAddIntegration, organization, reinstall, analyticsParams, modalParams, ...buttonProps } = this.props; const label = buttonText || t(reinstall ? 'Enable' : 'Add %s', provider.metadata.noun); return ( {onClick => ( )} ); } }