missingAlertsButtons.tsx 950 B

1234567891011121314151617181920212223242526272829303132333435
  1. import Button from 'sentry/components/button';
  2. import ButtonBar from 'sentry/components/buttonBar';
  3. import CreateAlertButton from 'sentry/components/createAlertButton';
  4. import {t} from 'sentry/locale';
  5. import {Organization} from 'sentry/types';
  6. const DOCS_URL = 'https://docs.sentry.io/product/alerts-notifications/metric-alerts/';
  7. type Props = {
  8. organization: Organization;
  9. projectSlug: string;
  10. };
  11. function MissingAlertsButtons({organization, projectSlug}: Props) {
  12. return (
  13. <ButtonBar gap={1}>
  14. <CreateAlertButton
  15. organization={organization}
  16. iconProps={{size: 'xs'}}
  17. size="sm"
  18. priority="primary"
  19. referrer="project_detail"
  20. projectSlug={projectSlug}
  21. hideIcon
  22. >
  23. {t('Create Alert')}
  24. </CreateAlertButton>
  25. <Button size="sm" external href={DOCS_URL}>
  26. {t('Learn More')}
  27. </Button>
  28. </ButtonBar>
  29. );
  30. }
  31. export default MissingAlertsButtons;