@bitrise/bitkit 13.242.0 → 13.243.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bitrise/bitkit",
3
3
  "description": "Bitrise React component library",
4
- "version": "13.242.0",
4
+ "version": "13.243.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -386,6 +386,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
386
386
  isError,
387
387
  isWarning,
388
388
  label,
389
+ labelHelp,
389
390
  name,
390
391
  onBlur,
391
392
  onChange,
@@ -498,6 +499,7 @@ const Dropdown = forwardRef<Element, DropdownProps<string | null>>(
498
499
  badge={badge}
499
500
  infoTooltipLabel={infoTooltipLabel}
500
501
  infoTooltipProps={infoTooltipProps}
502
+ labelHelp={labelHelp}
501
503
  htmlFor={buttonId}
502
504
  >
503
505
  {label}
@@ -26,6 +26,7 @@ export interface DropdownProps<T> extends ChakraProps {
26
26
  id?: string;
27
27
  infoTooltipLabel?: string;
28
28
  infoTooltipProps?: TooltipProps;
29
+ labelHelp?: (icon: ReactNode) => ReactNode;
29
30
  isError?: boolean;
30
31
  isWarning?: boolean;
31
32
  label?: string;
@@ -10,13 +10,14 @@ export interface FormLabelProps extends ChakraFormLabelProps {
10
10
  children?: string;
11
11
  infoTooltipLabel?: string;
12
12
  infoTooltipProps?: TooltipProps;
13
+ labelHelp?: (icon: ReactNode) => ReactNode;
13
14
  maxLength?: number;
14
15
  valueLength?: number;
15
16
  withCounter?: boolean;
16
17
  }
17
18
 
18
19
  const FormLabel = forwardRef<FormLabelProps, 'label'>((props, ref) => {
19
- const { badge, infoTooltipLabel, infoTooltipProps, maxLength, valueLength, withCounter, ...rest } = props;
20
+ const { badge, infoTooltipLabel, infoTooltipProps, labelHelp, maxLength, valueLength, withCounter, ...rest } = props;
20
21
 
21
22
  const showLabel = rest.children || !!infoTooltipLabel || (withCounter && maxLength);
22
23
 
@@ -39,6 +40,8 @@ const FormLabel = forwardRef<FormLabelProps, 'label'>((props, ref) => {
39
40
  ref={ref}
40
41
  />
41
42
 
43
+ {labelHelp?.(<Icon color="icon/tertiary" name="Info" size="16" />)}
44
+
42
45
  {!!infoTooltipLabel && (
43
46
  <Tooltip label={infoTooltipLabel} placement="right" {...infoTooltipProps}>
44
47
  <Icon color="icon/tertiary" name="Info" size="16" />