onboardingPanel.tsx 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. import styled from '@emotion/styled';
  2. import {Panel} from 'sentry/components/panels';
  3. import space from 'sentry/styles/space';
  4. type Props = {
  5. children: React.ReactNode;
  6. image: React.ReactNode;
  7. className?: string;
  8. };
  9. function OnboardingPanel({className, image, children}: Props) {
  10. return (
  11. <Panel className={className}>
  12. <Container>
  13. <IlloBox>{image}</IlloBox>
  14. <StyledBox>{children}</StyledBox>
  15. </Container>
  16. </Panel>
  17. );
  18. }
  19. const Container = styled('div')`
  20. padding: ${space(3)};
  21. position: relative;
  22. @media (min-width: ${p => p.theme.breakpoints.small}) {
  23. display: flex;
  24. align-items: center;
  25. flex-direction: row;
  26. justify-content: center;
  27. flex-wrap: wrap;
  28. min-height: 300px;
  29. max-width: 1000px;
  30. margin: 0 auto;
  31. }
  32. @media (min-width: ${p => p.theme.breakpoints.medium}) {
  33. min-height: 350px;
  34. }
  35. `;
  36. const StyledBox = styled('div')`
  37. z-index: 1;
  38. @media (min-width: ${p => p.theme.breakpoints.small}) {
  39. flex: 2;
  40. }
  41. `;
  42. const IlloBox = styled(StyledBox)`
  43. position: relative;
  44. min-height: 100px;
  45. max-width: 300px;
  46. margin: ${space(2)} auto;
  47. @media (min-width: ${p => p.theme.breakpoints.small}) {
  48. flex: 1;
  49. margin: ${space(3)};
  50. max-width: auto;
  51. }
  52. `;
  53. export default OnboardingPanel;