calendarStylesWrapper.tsx 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. import 'react-date-range/dist/styles.css';
  2. import 'react-date-range/dist/theme/default.css';
  3. import styled from '@emotion/styled';
  4. import space from 'sentry/styles/space';
  5. const CalendarStylesWrapper = styled('div')`
  6. padding: ${space(3)};
  7. .rdrCalendarWrapper:not(.rdrDateRangeWrapper) .rdrDayHovered .rdrDayNumber:after {
  8. border: 0;
  9. }
  10. .rdrSelected,
  11. .rdrInRange,
  12. .rdrStartEdge,
  13. .rdrEndEdge {
  14. background-color: ${p => p.theme.active};
  15. }
  16. .rdrStartEdge + .rdrDayStartPreview {
  17. background-color: transparent;
  18. }
  19. .rdrDayNumber span {
  20. color: ${p => p.theme.textColor};
  21. }
  22. .rdrDayDisabled {
  23. background: none;
  24. }
  25. .rdrDayDisabled span {
  26. color: ${p => p.theme.subText};
  27. }
  28. .rdrDayToday .rdrDayNumber span {
  29. color: ${p => p.theme.active};
  30. }
  31. .rdrDayNumber span:after {
  32. background-color: ${p => p.theme.active};
  33. }
  34. .rdrDefinedRangesWrapper,
  35. .rdrDateDisplayWrapper,
  36. .rdrWeekDays {
  37. display: none;
  38. }
  39. .rdrInRange {
  40. background: ${p => p.theme.active};
  41. }
  42. .rdrDayInPreview {
  43. background: ${p => p.theme.hover};
  44. }
  45. .rdrMonth {
  46. width: 300px;
  47. font-size: 1.2em;
  48. padding: 0;
  49. }
  50. .rdrStartEdge {
  51. border-top-left-radius: 1.14em;
  52. border-bottom-left-radius: 1.14em;
  53. }
  54. .rdrEndEdge {
  55. border-top-right-radius: 1.14em;
  56. border-bottom-right-radius: 1.14em;
  57. }
  58. .rdrDayStartPreview,
  59. .rdrDayEndPreview,
  60. .rdrDayInPreview {
  61. border: 0;
  62. background: rgba(200, 200, 200, 0.3);
  63. }
  64. .rdrDayStartOfMonth,
  65. .rdrDayStartOfWeek {
  66. .rdrInRange {
  67. border-top-left-radius: 0;
  68. border-bottom-left-radius: 0;
  69. }
  70. }
  71. .rdrDayEndOfMonth,
  72. .rdrDayEndOfWeek {
  73. .rdrInRange {
  74. border-top-right-radius: 0;
  75. border-bottom-right-radius: 0;
  76. }
  77. }
  78. .rdrStartEdge.rdrEndEdge {
  79. border-radius: 1.14em;
  80. }
  81. .rdrMonthAndYearWrapper {
  82. padding-bottom: ${space(1)};
  83. padding-top: 0;
  84. height: 32px;
  85. }
  86. .rdrDay {
  87. height: 2.5em;
  88. }
  89. .rdrMonthPicker select,
  90. .rdrYearPicker select {
  91. background: none;
  92. color: ${p => p.theme.textColor};
  93. font-weight: normal;
  94. font-size: ${p => p.theme.fontSizeLarge};
  95. padding: 0;
  96. }
  97. .rdrMonthsVertical {
  98. align-items: center;
  99. }
  100. .rdrCalendarWrapper {
  101. flex: 1;
  102. background: none;
  103. }
  104. .rdrNextPrevButton {
  105. background-color: transparent;
  106. border: 1px solid ${p => p.theme.border};
  107. }
  108. .rdrPprevButton i {
  109. border-right-color: ${p => p.theme.textColor};
  110. }
  111. .rdrNextButton i {
  112. border-left-color: ${p => p.theme.textColor};
  113. }
  114. `;
  115. export default CalendarStylesWrapper;