dce-reactkit 3.7.24 → 3.7.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@
4
4
  */
5
5
  import React from 'react';
6
6
  type Props = {
7
+ grayBackground?: boolean;
7
8
  customBackgroundColor?: string;
8
9
  children: React.ReactNode;
9
10
  };
package/dist/index.d.ts CHANGED
@@ -283,6 +283,7 @@ declare const SimpleDateChooser: React$1.FC<Props$e>;
283
283
  */
284
284
 
285
285
  type Props$d = {
286
+ grayBackground?: boolean;
286
287
  customBackgroundColor?: string;
287
288
  children: React$1.ReactNode;
288
289
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.7.24",
3
+ "version": "3.7.27",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -675,7 +675,7 @@ const AppWrapper: React.FC<Props> = (props: Props): React.ReactElement => {
675
675
  : `
676
676
  .tooltip-inner {
677
677
  background-color: black;
678
- color: black;
678
+ color: white;
679
679
  border: 0.1rem solid white;
680
680
  pointer-events: none;
681
681
  }
@@ -12,6 +12,8 @@ import React from 'react';
12
12
 
13
13
  // Props definition
14
14
  type Props = {
15
+ // If true, the background color is gray
16
+ grayBackground?: boolean,
15
17
  // Custom background color
16
18
  customBackgroundColor?: string,
17
19
  // Children to display
@@ -51,6 +53,7 @@ const Drawer: React.FC<Props> = (props) => {
51
53
 
52
54
  // Destructure all props
53
55
  const {
56
+ grayBackground,
54
57
  customBackgroundColor,
55
58
  children,
56
59
  } = props;
@@ -67,7 +70,11 @@ const Drawer: React.FC<Props> = (props) => {
67
70
  <div
68
71
  className="Drawer-container"
69
72
  style={{
70
- backgroundColor: (customBackgroundColor ?? undefined),
73
+ backgroundColor: (
74
+ grayBackground
75
+ ? '#E2E3E5'
76
+ : (customBackgroundColor ?? undefined)
77
+ ),
71
78
  }}
72
79
  >
73
80
  <style>{style}</style>