styles.tsx 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. import styled from '@emotion/styled';
  2. import {Button as CommonButton} from 'sentry/components/button';
  3. import {
  4. SpanDetailContainer,
  5. SpanDetails,
  6. } from 'sentry/components/events/interfaces/spans/newTraceDetailsSpanDetails';
  7. import {DataSection} from 'sentry/components/events/styles';
  8. import {space} from 'sentry/styles/space';
  9. const DetailContainer = styled('div')`
  10. display: flex;
  11. flex-direction: column;
  12. gap: ${space(2)};
  13. padding: ${space(1)};
  14. ${DataSection} {
  15. padding: 0;
  16. }
  17. ${SpanDetails} {
  18. padding: 0;
  19. }
  20. ${SpanDetailContainer} {
  21. border-bottom: none !important;
  22. }
  23. `;
  24. const FlexBox = styled('div')`
  25. display: flex;
  26. align-items: center;
  27. `;
  28. const Actions = styled(FlexBox)`
  29. gap: ${space(0.5)};
  30. `;
  31. const Title = styled(FlexBox)`
  32. gap: ${space(1)};
  33. `;
  34. const Type = styled('div')`
  35. font-size: ${p => p.theme.fontSizeSmall};
  36. `;
  37. const TitleOp = styled('div')`
  38. font-size: 15px;
  39. font-weight: bold;
  40. max-width: 600px;
  41. ${p => p.theme.overflowEllipsis}
  42. `;
  43. const Table = styled('table')`
  44. margin-bottom: 0 !important;
  45. `;
  46. const IconTitleWrapper = styled(FlexBox)`
  47. gap: ${space(1)};
  48. `;
  49. const IconBorder = styled('div')<{errored?: boolean}>`
  50. background-color: ${p => (p.errored ? p.theme.error : p.theme.blue300)};
  51. border-radius: ${p => p.theme.borderRadius};
  52. padding: 0;
  53. display: flex;
  54. align-items: center;
  55. justify-content: center;
  56. width: 30px;
  57. height: 30px;
  58. svg {
  59. fill: ${p => p.theme.white};
  60. width: 14px;
  61. height: 14px;
  62. }
  63. `;
  64. const Button = styled(CommonButton)`
  65. position: absolute;
  66. top: ${space(0.75)};
  67. right: ${space(0.5)};
  68. `;
  69. const HeaderContainer = styled(Title)`
  70. justify-content: space-between;
  71. `;
  72. const TraceDrawerComponents = {
  73. DetailContainer,
  74. FlexBox,
  75. Title,
  76. Type,
  77. TitleOp,
  78. HeaderContainer,
  79. Actions,
  80. Table,
  81. IconTitleWrapper,
  82. IconBorder,
  83. Button,
  84. };
  85. export {TraceDrawerComponents};