dce-reactkit 3.7.15 → 3.7.16

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.
@@ -9,6 +9,8 @@ type Props = {
9
9
  children: React.ReactNode;
10
10
  className?: string;
11
11
  wrapButtonsAndAddGaps?: boolean;
12
+ isAdminFeature?: boolean;
13
+ noMarginOnBottom?: boolean;
12
14
  };
13
15
  declare const ButtonInputGroup: React.FC<Props>;
14
16
  export default ButtonInputGroup;
package/dist/index.d.ts CHANGED
@@ -249,6 +249,8 @@ type Props$f = {
249
249
  children: React$1.ReactNode;
250
250
  className?: string;
251
251
  wrapButtonsAndAddGaps?: boolean;
252
+ isAdminFeature?: boolean;
253
+ noMarginOnBottom?: boolean;
252
254
  };
253
255
  declare const ButtonInputGroup: React$1.FC<Props$f>;
254
256
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.7.15",
3
+ "version": "3.7.16",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -22,6 +22,10 @@ type Props = {
22
22
  className?: string,
23
23
  // If true, wrap buttons and create gaps
24
24
  wrapButtonsAndAddGaps?: boolean,
25
+ // If true, is an admin feature
26
+ isAdminFeature?: boolean,
27
+ // If true, don't add a margin on the bottom
28
+ noMarginOnBottom?: boolean,
25
29
  };
26
30
 
27
31
  /*------------------------------------------------------------------------*/
@@ -42,6 +46,8 @@ const ButtonInputGroup: React.FC<Props> = (props) => {
42
46
  children,
43
47
  className,
44
48
  wrapButtonsAndAddGaps,
49
+ isAdminFeature,
50
+ noMarginOnBottom,
45
51
  } = props;
46
52
 
47
53
  /*------------------------------------------------------------------------*/
@@ -53,11 +59,11 @@ const ButtonInputGroup: React.FC<Props> = (props) => {
53
59
  /*----------------------------------------*/
54
60
 
55
61
  return (
56
- <div className={`input-group ${className ?? ''}`}>
62
+ <div className={`input-group ${className ?? ''} ${noMarginOnBottom ? '' : 'mb-2'}`}>
57
63
  <div className="input-group-prepend d-flex w-100">
58
64
  {/* Label */}
59
65
  <span
60
- className="input-group-text"
66
+ className={`input-group-text ${isAdminFeature ? 'border border-success progress-bar-striped bg-success text-white fw-bold' : ''}`}
61
67
  style={{
62
68
  minWidth: (
63
69
  minLabelWidth
@@ -72,7 +78,7 @@ const ButtonInputGroup: React.FC<Props> = (props) => {
72
78
 
73
79
  {/* Contents */}
74
80
  <span
75
- className="input-group-text flex-grow-1 rounded-right d-flex flex-wrap"
81
+ className={`input-group-text flex-grow-1 ${isAdminFeature ? 'border-success ' : ''}rounded-right d-flex flex-wrap`}
76
82
  style={{
77
83
  backgroundColor: 'white',
78
84
  borderTopLeftRadius: 0,