disabledAlertWizard.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import styled from '@emotion/styled';
  2. import {Button} from 'sentry/components/button';
  3. import ButtonBar from 'sentry/components/buttonBar';
  4. import {t} from 'sentry/locale';
  5. import {space} from 'sentry/styles/space';
  6. import type {Organization} from 'sentry/types/organization';
  7. import {openUpsellModal} from 'getsentry/actionCreators/modal';
  8. type Props = React.PropsWithChildren<{
  9. organization: Organization;
  10. }>;
  11. function DisabledAlertWizard({organization}: Props) {
  12. return (
  13. <Wrapper>
  14. <Description>{t('Upgrade your plan to create this type of alert')}</Description>
  15. <ButtonBar gap={1}>
  16. <Button
  17. onClick={() =>
  18. openUpsellModal({
  19. organization,
  20. source: 'alert-wizard',
  21. defaultSelection: 'integration-alerts',
  22. })
  23. }
  24. >
  25. {t('Learn More')}
  26. </Button>
  27. <Button priority="primary" disabled>
  28. {t('Set Conditions')}
  29. </Button>
  30. </ButtonBar>
  31. </Wrapper>
  32. );
  33. }
  34. export default DisabledAlertWizard;
  35. const Wrapper = styled('div')`
  36. display: flex;
  37. flex-wrap: wrap;
  38. align-items: center;
  39. justify-content: space-between;
  40. `;
  41. const Description = styled('div')`
  42. margin: ${space(1)} ${space(1)} ${space(1)} 0;
  43. `;