demoSignUp.tsx 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. import {css} from '@emotion/react';
  2. import styled from '@emotion/styled';
  3. import {ModalRenderProps} from 'sentry/actionCreators/modal';
  4. import Button from 'sentry/components/button';
  5. import ButtonBar from 'sentry/components/buttonBar';
  6. import HighlightModalContainer from 'sentry/components/highlightModalContainer';
  7. import {t} from 'sentry/locale';
  8. import space from 'sentry/styles/space';
  9. import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
  10. import {extraQueryParameterWithEmail, urlAttachQueryParams} from 'sentry/utils/demoMode';
  11. type Props = ModalRenderProps;
  12. const DemoSignUpModal = ({closeModal}: Props) => {
  13. const signupUrl = urlAttachQueryParams(
  14. 'https://sentry.io/signup/',
  15. extraQueryParameterWithEmail()
  16. );
  17. return (
  18. <HighlightModalContainer>
  19. <div>
  20. <TrialCheckInfo>
  21. <Subheader>{t('Sandbox Signup')}</Subheader>
  22. <h2>{t('Hey, love what you see?')}</h2>
  23. <p>
  24. {t(
  25. 'Sign up now to setup your own project to see problems within your code and learn how to quickly improve your project.'
  26. )}
  27. </p>
  28. </TrialCheckInfo>
  29. <StyledButtonBar gap={2}>
  30. <Button
  31. priority="primary"
  32. href={signupUrl}
  33. onClick={() =>
  34. trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_signup', {
  35. organization: null,
  36. })
  37. }
  38. >
  39. {t('Sign up now')}
  40. </Button>
  41. <Button
  42. priority="default"
  43. onClick={() => {
  44. trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_continue', {
  45. organization: null,
  46. });
  47. closeModal();
  48. }}
  49. >
  50. {t('Keep Exploring')}
  51. </Button>
  52. </StyledButtonBar>
  53. </div>
  54. </HighlightModalContainer>
  55. );
  56. };
  57. const TrialCheckInfo = styled('div')`
  58. padding: ${space(3)} 0;
  59. p {
  60. font-size: ${p => p.theme.fontSizeMedium};
  61. margin: 0;
  62. }
  63. h2 {
  64. font-size: 1.5em;
  65. }
  66. `;
  67. export const modalCss = css`
  68. width: 100%;
  69. max-width: 730px;
  70. [role='document'] {
  71. position: relative;
  72. padding: 70px 80px;
  73. overflow: hidden;
  74. }
  75. `;
  76. const Subheader = styled('h4')`
  77. margin-bottom: ${space(2)};
  78. text-transform: uppercase;
  79. font-weight: bold;
  80. color: ${p => p.theme.purple300};
  81. font-size: ${p => p.theme.fontSizeExtraSmall};
  82. `;
  83. const StyledButtonBar = styled(ButtonBar)`
  84. margin-top: ${space(2)};
  85. max-width: fit-content;
  86. `;
  87. export default DemoSignUpModal;