styles.tsx 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. import styled from '@emotion/styled';
  2. import space from 'sentry/styles/space';
  3. export const SubHeading = styled('h3')`
  4. font-size: ${p => p.theme.fontSizeLarge};
  5. font-weight: normal;
  6. color: ${p => p.theme.textColor};
  7. margin: 0;
  8. overflow: hidden;
  9. text-overflow: ellipsis;
  10. white-space: nowrap;
  11. `;
  12. export const SectionHeading = styled('h4')`
  13. display: inline-grid;
  14. grid-auto-flow: column;
  15. gap: ${space(1)};
  16. align-items: center;
  17. color: ${p => p.theme.subText};
  18. font-size: ${p => p.theme.fontSizeMedium};
  19. margin: ${space(1)} 0;
  20. `;
  21. export const SectionValue = styled('span')`
  22. color: ${p => p.theme.subText};
  23. font-size: ${p => p.theme.fontSizeMedium};
  24. margin-right: ${space(1)};
  25. `;
  26. export const InlineContainer = styled('div')`
  27. display: grid;
  28. align-items: center;
  29. @media (min-width: ${p => p.theme.breakpoints.small}) {
  30. grid-auto-flow: column;
  31. grid-column-gap: ${space(1)};
  32. }
  33. `;
  34. export const ChartControls = styled('div')`
  35. padding: ${space(1)} ${space(1)} ${space(1)} ${space(3)};
  36. border-top: 1px solid ${p => p.theme.border};
  37. @media (min-width: ${p => p.theme.breakpoints.small}) {
  38. display: flex;
  39. justify-content: space-between;
  40. flex-wrap: wrap;
  41. }
  42. `;
  43. // Header element for charts within panels.
  44. export const HeaderTitle = styled('div')`
  45. display: inline-grid;
  46. grid-auto-flow: column;
  47. gap: ${space(1)};
  48. ${p => p.theme.text.cardTitle};
  49. color: ${p => p.theme.headingColor};
  50. align-items: center;
  51. `;
  52. // Header element for charts within panels
  53. // This header can be rendered while the chart is still loading
  54. export const HeaderTitleLegend = styled(HeaderTitle)`
  55. background-color: ${p => p.theme.background};
  56. border-bottom-right-radius: ${p => p.theme.borderRadius};
  57. position: absolute;
  58. z-index: 1;
  59. `;
  60. // Used for rendering total value of a chart right below the HeaderTitleLegend
  61. export const HeaderValue = styled('div')`
  62. display: inline-grid;
  63. grid-auto-flow: column;
  64. gap: ${space(1)};
  65. align-items: baseline;
  66. background-color: ${p => p.theme.background};
  67. position: absolute;
  68. top: 40px;
  69. z-index: 1;
  70. font-size: ${p => p.theme.headerFontSize};
  71. `;
  72. export const ChartContainer = styled('div')`
  73. padding: ${space(2)} ${space(3)};
  74. `;