@bitrise/bitkit 12.69.1 → 12.69.2
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
|
@@ -4,9 +4,6 @@ const { defineMultiStyleConfig } = createMultiStyleConfigHelpers(['button', 'che
|
|
|
4
4
|
|
|
5
5
|
const ExpandableCardTheme = defineMultiStyleConfig({
|
|
6
6
|
baseStyle: ({ isOpen }) => ({
|
|
7
|
-
box: {
|
|
8
|
-
zIndex: 1,
|
|
9
|
-
},
|
|
10
7
|
button: {
|
|
11
8
|
borderTopStartRadius: '8',
|
|
12
9
|
borderTopEndRadius: '8',
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
|
+
import { Portal } from '@chakra-ui/react';
|
|
1
3
|
import IconButton, { IconButtonProps } from '../IconButton/IconButton';
|
|
2
4
|
import Menu, { MenuProps } from '../Menu/Menu';
|
|
3
5
|
import MenuButton from '../Menu/MenuButton';
|
|
@@ -7,9 +9,11 @@ export interface OverflowMenuProps extends MenuProps {
|
|
|
7
9
|
children: MenuListProps['children'];
|
|
8
10
|
buttonSize?: IconButtonProps['size'];
|
|
9
11
|
triggerLabel?: string;
|
|
12
|
+
withPortal?: boolean;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
const OverflowMenu = ({ buttonSize = 'small', children, triggerLabel }: OverflowMenuProps) => {
|
|
15
|
+
const OverflowMenu = ({ buttonSize = 'small', children, triggerLabel, withPortal }: OverflowMenuProps) => {
|
|
16
|
+
const Wrapper = withPortal ? Portal : Fragment;
|
|
13
17
|
return (
|
|
14
18
|
<Menu isLazy>
|
|
15
19
|
<MenuButton
|
|
@@ -20,13 +24,16 @@ const OverflowMenu = ({ buttonSize = 'small', children, triggerLabel }: Overflow
|
|
|
20
24
|
size={buttonSize}
|
|
21
25
|
variant="tertiary"
|
|
22
26
|
/>
|
|
23
|
-
<
|
|
27
|
+
<Wrapper>
|
|
28
|
+
<MenuList>{children}</MenuList>
|
|
29
|
+
</Wrapper>
|
|
24
30
|
</Menu>
|
|
25
31
|
);
|
|
26
32
|
};
|
|
27
33
|
|
|
28
34
|
OverflowMenu.defaultProps = {
|
|
29
35
|
triggerLabel: 'Open menu',
|
|
36
|
+
withPortal: false,
|
|
30
37
|
};
|
|
31
38
|
|
|
32
39
|
export default OverflowMenu;
|