@lobehub/ui 1.142.0 → 1.142.1
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.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { type LucideIcon } from 'lucide-react';
|
|
3
3
|
import { type ActionIconProps } from "../ActionIcon";
|
|
4
|
+
import { IconSizeType } from "../Icon";
|
|
4
5
|
import { DivProps } from "../types";
|
|
5
6
|
export interface ActionIconGroupItems {
|
|
6
7
|
disable?: boolean;
|
|
@@ -36,6 +37,11 @@ export interface ActionIconGroupProps extends DivProps {
|
|
|
36
37
|
* @enum ["top","left","right","bottom","topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]
|
|
37
38
|
*/
|
|
38
39
|
placement?: ActionIconProps['placement'];
|
|
40
|
+
/**
|
|
41
|
+
* @description The size of the group
|
|
42
|
+
* @default "small"
|
|
43
|
+
*/
|
|
44
|
+
size?: IconSizeType;
|
|
39
45
|
/**
|
|
40
46
|
* @description Whether to add a spotlight background
|
|
41
47
|
* @default true
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
4
4
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
5
|
-
var _excluded = ["type", "items", "placement", "spotlight", "direction", "dropdownMenu", "onActionClick"];
|
|
5
|
+
var _excluded = ["type", "items", "placement", "spotlight", "direction", "dropdownMenu", "onActionClick", "size"];
|
|
6
6
|
import { Dropdown } from 'antd';
|
|
7
7
|
import { MoreHorizontal } from 'lucide-react';
|
|
8
8
|
import { memo } from 'react';
|
|
@@ -26,6 +26,8 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
26
26
|
_ref$dropdownMenu = _ref.dropdownMenu,
|
|
27
27
|
dropdownMenu = _ref$dropdownMenu === void 0 ? [] : _ref$dropdownMenu,
|
|
28
28
|
onActionClick = _ref.onActionClick,
|
|
29
|
+
_ref$size = _ref.size,
|
|
30
|
+
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
29
31
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
30
32
|
var _useStyles = useStyles({
|
|
31
33
|
type: type
|
|
@@ -48,7 +50,7 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
48
50
|
});
|
|
49
51
|
} : undefined,
|
|
50
52
|
placement: tooltipsPlacement,
|
|
51
|
-
size:
|
|
53
|
+
size: size,
|
|
52
54
|
title: item.label
|
|
53
55
|
}, item.key);
|
|
54
56
|
}), (dropdownMenu === null || dropdownMenu === void 0 ? void 0 : dropdownMenu.length) > 0 && /*#__PURE__*/_jsx(Dropdown, {
|
|
@@ -59,7 +61,7 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
59
61
|
disabled: item.disable,
|
|
60
62
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
61
63
|
icon: item.icon,
|
|
62
|
-
size:
|
|
64
|
+
size: size
|
|
63
65
|
}),
|
|
64
66
|
onClick: onActionClick ? function (info) {
|
|
65
67
|
return onActionClick({
|
|
@@ -75,7 +77,7 @@ var ActionIconGroup = /*#__PURE__*/memo(function (_ref) {
|
|
|
75
77
|
children: /*#__PURE__*/_jsx(ActionIcon, {
|
|
76
78
|
icon: MoreHorizontal,
|
|
77
79
|
placement: tooltipsPlacement,
|
|
78
|
-
size:
|
|
80
|
+
size: size
|
|
79
81
|
}, "more")
|
|
80
82
|
})]
|
|
81
83
|
}));
|