@bitrise/bitkit 13.349.0 → 13.351.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,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
forwardRef,
|
|
3
|
+
IconProps,
|
|
3
4
|
MenuItem as ChakraMenuItem,
|
|
4
5
|
MenuItemProps as ChakraMenuItemProps,
|
|
5
6
|
SystemStyleObject,
|
|
6
7
|
useMenuStyles,
|
|
7
8
|
} from 'chakra-ui-2--react';
|
|
8
9
|
|
|
9
|
-
import { TypeColors } from '../../types/bitkit';
|
|
10
10
|
import Box from '../Box/Box';
|
|
11
11
|
import Icon, { TypeIconName } from '../Icon/Icon';
|
|
12
12
|
|
|
@@ -25,9 +25,9 @@ export interface MenuItemProps extends Omit<ChakraMenuItemProps, 'icon'> {
|
|
|
25
25
|
as?: 'a' | 'button';
|
|
26
26
|
iconName?: TypeIconName;
|
|
27
27
|
isDanger?: boolean;
|
|
28
|
-
leftIconColor?:
|
|
28
|
+
leftIconColor?: IconProps['color'];
|
|
29
29
|
leftIconName?: TypeIconName;
|
|
30
|
-
rightIconColor?:
|
|
30
|
+
rightIconColor?: IconProps['color'];
|
|
31
31
|
rightIconName?: TypeIconName;
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -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';
|