@bitrise/bitkit 13.349.0 → 13.350.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.349.0",
4
+ "version": "13.350.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+ssh://git@github.com/bitrise-io/bitkit.git"
@@ -0,0 +1,30 @@
1
+ import { forwardRef, Tooltip as ChakraTooltip, TooltipProps as ChakraTooltipProps } from 'chakra-ui-2--react';
2
+
3
+ export interface OverflowTooltipProps extends Omit<ChakraTooltipProps, 'children'> {
4
+ label: string;
5
+ children: React.ReactNode;
6
+ }
7
+
8
+ const OverflowTooltip = forwardRef<OverflowTooltipProps, 'div'>((props, ref) => {
9
+ const { children, ...rest } = props;
10
+
11
+ const properties: Omit<ChakraTooltipProps, 'children'> = {
12
+ bg: 'background/tertiary',
13
+ color: 'text/body',
14
+ textStyle: 'body/sm/regular',
15
+ borderRadius: '4',
16
+ paddingX: '8',
17
+ paddingY: '4',
18
+ maxWidth: '800',
19
+ placement: 'top',
20
+ ...rest,
21
+ };
22
+
23
+ return (
24
+ <ChakraTooltip {...properties} ref={ref}>
25
+ {children}
26
+ </ChakraTooltip>
27
+ );
28
+ });
29
+
30
+ export default OverflowTooltip;
package/src/index.ts CHANGED
@@ -139,6 +139,8 @@ export type { OverflowMenuProps } from './Components/OverflowMenu/OverflowMenu';
139
139
  export { default as OverflowMenu } from './Components/OverflowMenu/OverflowMenu';
140
140
  export type { OverflowMenuItemProps } from './Components/OverflowMenu/OverflowMenuItem';
141
141
  export { default as OverflowMenuItem } from './Components/OverflowMenu/OverflowMenuItem';
142
+ export type { OverflowTooltipProps } from './Components/OverflowTooltip/OverflowTooltip';
143
+ export { default as OverflowTooltip } from './Components/OverflowTooltip/OverflowTooltip';
142
144
  export type { PaginationProps } from './Components/Pagination/Pagination';
143
145
  export { default as Pagination } from './Components/Pagination/Pagination';
144
146
  export type { PaginationLoadMoreProps } from './Components/PaginationLoadMore/PaginationLoadMore';