@gravity-ui/dashkit 8.7.1 → 8.7.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.
|
@@ -152,7 +152,7 @@ class OverlayControls extends react_1.default.Component {
|
|
|
152
152
|
}
|
|
153
153
|
renderMenu(isOnlyOneItem) {
|
|
154
154
|
const { view, size } = this.props;
|
|
155
|
-
const dropdown = this.renderDropdownMenu();
|
|
155
|
+
const dropdown = this.renderDropdownMenu(isOnlyOneItem);
|
|
156
156
|
if (dropdown) {
|
|
157
157
|
return dropdown;
|
|
158
158
|
}
|
|
@@ -162,7 +162,7 @@ class OverlayControls extends react_1.default.Component {
|
|
|
162
162
|
isDefaultMenu(menu) {
|
|
163
163
|
return menu === null || menu === void 0 ? void 0 : menu.every((item) => Object.values(constants_1.MenuItems).includes(String(item)));
|
|
164
164
|
}
|
|
165
|
-
renderDropdownMenu() {
|
|
165
|
+
renderDropdownMenu(isOnlyOneItem) {
|
|
166
166
|
const { view, size } = this.props;
|
|
167
167
|
const { menu: contextMenu, itemsParams, itemsState } = this.context;
|
|
168
168
|
const configItem = this.props.configItem;
|
|
@@ -204,7 +204,7 @@ class OverlayControls extends react_1.default.Component {
|
|
|
204
204
|
if (items.length === 0) {
|
|
205
205
|
return null;
|
|
206
206
|
}
|
|
207
|
-
return (react_1.default.createElement(uikit_1.DropdownMenu, { items: items, renderSwitcher: (props) => (react_1.default.createElement(uikit_1.Button, Object.assign({}, props, { view: view, size: size, pin:
|
|
207
|
+
return (react_1.default.createElement(uikit_1.DropdownMenu, { items: items, renderSwitcher: (props) => (react_1.default.createElement(uikit_1.Button, Object.assign({}, props, { view: view, size: size, pin: isOnlyOneItem ? 'round-round' : 'brick-round', qa: "dashkit-overlay-control-menu" }),
|
|
208
208
|
react_1.default.createElement(uikit_1.Icon, { data: DotsIcon_1.DotsIcon, size: "16" }))) }));
|
|
209
209
|
}
|
|
210
210
|
getControlItemPinStyle(index, itemsLength) {
|
|
@@ -149,7 +149,7 @@ class OverlayControls extends React.Component {
|
|
|
149
149
|
}
|
|
150
150
|
renderMenu(isOnlyOneItem) {
|
|
151
151
|
const { view, size } = this.props;
|
|
152
|
-
const dropdown = this.renderDropdownMenu();
|
|
152
|
+
const dropdown = this.renderDropdownMenu(isOnlyOneItem);
|
|
153
153
|
if (dropdown) {
|
|
154
154
|
return dropdown;
|
|
155
155
|
}
|
|
@@ -159,7 +159,7 @@ class OverlayControls extends React.Component {
|
|
|
159
159
|
isDefaultMenu(menu) {
|
|
160
160
|
return menu === null || menu === void 0 ? void 0 : menu.every((item) => Object.values(MenuItems).includes(String(item)));
|
|
161
161
|
}
|
|
162
|
-
renderDropdownMenu() {
|
|
162
|
+
renderDropdownMenu(isOnlyOneItem) {
|
|
163
163
|
const { view, size } = this.props;
|
|
164
164
|
const { menu: contextMenu, itemsParams, itemsState } = this.context;
|
|
165
165
|
const configItem = this.props.configItem;
|
|
@@ -201,7 +201,7 @@ class OverlayControls extends React.Component {
|
|
|
201
201
|
if (items.length === 0) {
|
|
202
202
|
return null;
|
|
203
203
|
}
|
|
204
|
-
return (React.createElement(DropdownMenu, { items: items, renderSwitcher: (props) => (React.createElement(Button, Object.assign({}, props, { view: view, size: size, pin:
|
|
204
|
+
return (React.createElement(DropdownMenu, { items: items, renderSwitcher: (props) => (React.createElement(Button, Object.assign({}, props, { view: view, size: size, pin: isOnlyOneItem ? 'round-round' : 'brick-round', qa: "dashkit-overlay-control-menu" }),
|
|
205
205
|
React.createElement(Icon, { data: DotsIcon, size: "16" }))) }));
|
|
206
206
|
}
|
|
207
207
|
getControlItemPinStyle(index, itemsLength) {
|