pds-dev-kit-web-test 2.5.190 → 2.5.192
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.
@@ -55,6 +55,7 @@ function BasicButtonGroup(_a) {
|
|
55
55
|
var _g = (0, react_1.useState)(false), canShowTooltip = _g[0], setCanShowTooltip = _g[1];
|
56
56
|
var tooltipRef = (0, react_1.useRef)(null);
|
57
57
|
var tooltipPositionTargetRef = (0, react_1.useRef)(null);
|
58
|
+
console.log('canShowTooltip', canShowTooltip);
|
58
59
|
/**
|
59
60
|
* @when : hoveredButtonIndex 변경되었을 때
|
60
61
|
* @expected : tooltipPositionTargetRef, tooltipRef 의 위치를 업데이트합니다.
|
@@ -107,10 +108,9 @@ function BasicButtonGroup(_a) {
|
|
107
108
|
: "center_".concat(tooltipPosition)
|
108
109
|
});
|
109
110
|
var isHoveredButton = index === hoveredButtonIndex;
|
110
|
-
|
111
|
+
// const canShowTooltip = tooltipSizeOffset && tooltipPositionOffset;
|
111
112
|
return ((0, jsx_runtime_1.jsxs)(S_BasicButton, __assign({ size: size, onClick: function (e) { return onClick && onClick(e); }, onMouseDown: function (e) { return onMouseDown && onMouseDown(e); }, onPointerEnter: function () { return setHoveredButtonIndex(index); }, onPointerLeave: function () { return setHoveredButtonIndex(null); }, disabled: state === 'disabled' || buttonState === 'disabled' }, { children: [(0, jsx_runtime_1.jsx)(components_1.Icon, { iconName: iconName, size: size === 'small' ? 20 : 24, fillType: iconFillType, colorKey: getColorKey(buttonState, iconColorTheme) }), tooltipText &&
|
112
113
|
isHoveredButton &&
|
113
|
-
canShowTooltip && // 위치 계산이 완료된 후에만 렌더링
|
114
114
|
(0, react_dom_1.createPortal)((0, jsx_runtime_1.jsx)(S_TooltipWrapper, __assign({ className: "TooltipWrapper", ref: tooltipRef, tooltipPositionCss: tooltipPositionCss, size: size }, { children: (0, jsx_runtime_1.jsx)(TextLabel_1.TextLabel, { text: tooltipText, colorOverride: "ui_cpnt_textlabel_button_tooltip", styleTheme: "caption2Regular", colorTheme: "sysTextSecondary" }) })), document.getElementById('tooltip-root'))] }), iconName + index));
|
115
115
|
}) })));
|
116
116
|
}
|