@agility/plenum-ui 2.1.26 → 2.1.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.
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/types/stories/molecules/inputs/InputLabel/InputLabel.d.ts +1 -0
- package/package.json +1 -1
- package/stories/molecules/inputs/InputLabel/InputLabel.tsx +6 -3
- package/stories/molecules/inputs/checkbox/Checkbox.tsx +2 -1
package/package.json
CHANGED
|
@@ -16,6 +16,7 @@ export interface IInputLabelProps {
|
|
|
16
16
|
label?: string;
|
|
17
17
|
truncateLabel?: boolean;
|
|
18
18
|
fullWidthLabel?: boolean;
|
|
19
|
+
noMarginBottom?: boolean;
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
/** Comment */
|
|
@@ -28,7 +29,8 @@ const InputLabel: FC<IInputLabelProps> = ({
|
|
|
28
29
|
isError,
|
|
29
30
|
label,
|
|
30
31
|
truncateLabel = false,
|
|
31
|
-
fullWidthLabel = false
|
|
32
|
+
fullWidthLabel = false,
|
|
33
|
+
noMarginBottom = false
|
|
32
34
|
}: IInputLabelProps) => {
|
|
33
35
|
const labelStyles = cn(
|
|
34
36
|
"z-[2] inline-flex gap-1",
|
|
@@ -38,8 +40,9 @@ const InputLabel: FC<IInputLabelProps> = ({
|
|
|
38
40
|
{ "text-xs text-red-500 px-1 top-[10px] bg-white": isPlaceholder && isError },
|
|
39
41
|
{ "text-red-500 bg-white": !isPlaceholder && isError },
|
|
40
42
|
{ "text-gray-500/[.5]": isDisabled },
|
|
41
|
-
{ "inline-block transition-all text-sm text-gray-700
|
|
42
|
-
{ "block w-full": fullWidthLabel }
|
|
43
|
+
{ "inline-block transition-all text-sm text-gray-700": !isPlaceholder },
|
|
44
|
+
{ "block w-full": fullWidthLabel },
|
|
45
|
+
{ "mb-1": !noMarginBottom }
|
|
43
46
|
);
|
|
44
47
|
|
|
45
48
|
if (!label) return null;
|
|
@@ -88,7 +88,7 @@ const Checkbox: FC<ICheckboxProps> = ({
|
|
|
88
88
|
{...props}
|
|
89
89
|
/>
|
|
90
90
|
</div>
|
|
91
|
-
<div className="ml-
|
|
91
|
+
<div className="ml-2 text-sm flex items-center w-full">
|
|
92
92
|
<>
|
|
93
93
|
<InputLabel
|
|
94
94
|
label={label}
|
|
@@ -96,6 +96,7 @@ const Checkbox: FC<ICheckboxProps> = ({
|
|
|
96
96
|
id={id}
|
|
97
97
|
truncateLabel={truncateLabel}
|
|
98
98
|
fullWidthLabel={fullWidthLabel}
|
|
99
|
+
noMarginBottom={true}
|
|
99
100
|
/>
|
|
100
101
|
</>
|
|
101
102
|
|