@bitrise/bitkit 12.73.2 → 12.73.3

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": "12.73.2",
4
+ "version": "12.73.3",
5
5
  "repository": "git@github.com:bitrise-io/bitkit.git",
6
6
  "main": "src/index.ts",
7
7
  "license": "UNLICENSED",
@@ -1,13 +1,20 @@
1
- import { Tooltip as ChakraTooltip, TooltipProps as ChakraTooltipProps, forwardRef, chakra } from '@chakra-ui/react';
1
+ import {
2
+ Tooltip as ChakraTooltip,
3
+ TooltipProps as ChakraTooltipProps,
4
+ forwardRef,
5
+ chakra,
6
+ BoxProps,
7
+ } from '@chakra-ui/react';
2
8
 
3
9
  export interface TooltipProps extends Omit<ChakraTooltipProps, 'shouldWrapChildren'> {
4
10
  shouldWrapChildren?: boolean | 'block';
11
+ wrapperProps?: BoxProps;
5
12
  }
6
13
  /**
7
14
  * A tooltip is a brief, informative message that appears when a user interacts with an element. Tooltips are usually initiated in one of two ways: through a mouse-hover gesture or through a keyboard-hover gesture.
8
15
  */
9
16
  const Tooltip = forwardRef<TooltipProps, 'div'>((props, ref) => {
10
- const { children, shouldWrapChildren, ...rest } = props;
17
+ const { children, shouldWrapChildren, wrapperProps = {}, ...rest } = props;
11
18
  const properties: ChakraTooltipProps = {
12
19
  bg: 'neutral.10',
13
20
  children,
@@ -18,7 +25,7 @@ const Tooltip = forwardRef<TooltipProps, 'div'>((props, ref) => {
18
25
  };
19
26
  if (shouldWrapChildren) {
20
27
  properties.children = (
21
- <chakra.span display={shouldWrapChildren === 'block' ? 'block' : 'inline-block'} tabIndex={0}>
28
+ <chakra.span sx={wrapperProps} display={shouldWrapChildren === 'block' ? 'block' : 'inline-block'} tabIndex={0}>
22
29
  {children}
23
30
  </chakra.span>
24
31
  );