dce-reactkit 3.6.7 → 3.6.8

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.
@@ -10,6 +10,7 @@ type Props = {
10
10
  children: React.ReactNode;
11
11
  wide?: boolean;
12
12
  thin?: boolean;
13
+ containerIsDisplayBlock?: boolean;
13
14
  };
14
15
  declare const Tooltip: React.FC<Props>;
15
16
  export default Tooltip;
package/dist/index.d.ts CHANGED
@@ -593,6 +593,7 @@ type Props$2 = {
593
593
  children: React.ReactNode;
594
594
  wide?: boolean;
595
595
  thin?: boolean;
596
+ containerIsDisplayBlock?: boolean;
596
597
  };
597
598
  declare const Tooltip: React.FC<Props$2>;
598
599
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.6.7",
3
+ "version": "3.6.8",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -27,6 +27,8 @@ type Props = {
27
27
  wide?: boolean,
28
28
  // If true, tooltip is thinner
29
29
  thin?: boolean,
30
+ // If true, the tooltip container should be display: block
31
+ containerIsDisplayBlock?: boolean,
30
32
  };
31
33
 
32
34
  /*------------------------------------------------------------------------*/
@@ -48,7 +50,6 @@ const TOOLTIP_BORDER_RADIUS_REM = 0.3;
48
50
  const style = `
49
51
  /* Container for contents and tooltip */
50
52
  .Tooltip-outer-container {
51
- display: inline-block;
52
53
  position: relative;
53
54
  }
54
55
 
@@ -339,6 +340,7 @@ const Tooltip: React.FC<Props> = (props) => {
339
340
  children,
340
341
  wide,
341
342
  thin,
343
+ containerIsDisplayBlock,
342
344
  } = props;
343
345
 
344
346
  /* -------------- State ------------- */
@@ -463,7 +465,7 @@ const Tooltip: React.FC<Props> = (props) => {
463
465
  // Render
464
466
  return (
465
467
  <div
466
- className="Tooltip-outer-container"
468
+ className={`Tooltip-outer-container ${containerIsDisplayBlock ? 'd-block' : 'd-inline-block'}}`}
467
469
  aria-label={text}
468
470
  onMouseEnter={() => {
469
471
  dispatch({