index.tsx 691 B

1234567891011121314151617181920212223242526272829303132
  1. import styled from '@emotion/styled';
  2. import space from 'sentry/styles/space';
  3. /**
  4. * Common performance layouts
  5. */
  6. export const PerformanceLayoutBodyRow = styled('div')<{
  7. minSize: number;
  8. columns?: number;
  9. }>`
  10. display: grid;
  11. grid-template-columns: 1fr;
  12. grid-column-gap: ${space(2)};
  13. grid-row-gap: ${space(2)};
  14. @media (min-width: ${p => p.theme.breakpoints.small}) {
  15. grid-template-columns: repeat(2, 1fr);
  16. }
  17. @media (min-width: ${p => p.theme.breakpoints.large}) {
  18. ${p =>
  19. p.columns
  20. ? `
  21. grid-template-columns: repeat(${p.columns}, 1fr);
  22. `
  23. : `
  24. grid-template-columns: repeat(auto-fit, minmax(${p.minSize}px, 1fr));
  25. `}
  26. }
  27. `;