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.
- package/dist/cjs/index.js +4 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ButtonInputGroup.d.ts +2 -0
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ButtonInputGroup.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/ButtonInputGroup.tsx +9 -3
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -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=
|
|
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=
|
|
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,
|