@designbasekorea/ui 0.3.1 → 0.3.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/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.css.map +1 -1
- package/dist/index.esm.js +8 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +1 -1
- package/dist/index.umd.css +1 -1
- package/dist/index.umd.css.map +1 -1
- package/dist/index.umd.js +8 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +3 -3
package/dist/index.umd.js
CHANGED
|
@@ -2403,7 +2403,7 @@
|
|
|
2403
2403
|
};
|
|
2404
2404
|
Tooltip.displayName = 'Tooltip';
|
|
2405
2405
|
|
|
2406
|
-
const Button = React.forwardRef(({ variant = 'primary', size = 'm', radius, fullWidth = false, disabled = false, loading = false, iconOnly = false, startIcon: StartIcon, endIcon: EndIcon, tooltip, tooltipProps, className, children, onPress, type = 'button', ...props }, forwardedRef) => {
|
|
2406
|
+
const Button = React.forwardRef(({ variant = 'primary', size = 'm', radius, fullWidth = false, disabled = false, loading = false, loadingText, iconOnly = false, startIcon: StartIcon, endIcon: EndIcon, tooltip, tooltipProps, className, children, onPress, type = 'button', ...props }, forwardedRef) => {
|
|
2407
2407
|
const ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
2408
2408
|
const { buttonProps } = $701a24aa0da5b062$export$ea18c227d4417cc3({
|
|
2409
2409
|
...props,
|
|
@@ -2448,7 +2448,13 @@
|
|
|
2448
2448
|
};
|
|
2449
2449
|
const renderContent = () => {
|
|
2450
2450
|
if (loading) {
|
|
2451
|
-
|
|
2451
|
+
// 로딩 중 표시할 텍스트 결정: loadingText > children > 기본값
|
|
2452
|
+
const displayText = loadingText !== undefined
|
|
2453
|
+
? loadingText
|
|
2454
|
+
: (!iconOnly && children)
|
|
2455
|
+
? children
|
|
2456
|
+
: null;
|
|
2457
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Spinner, { type: "circular", size: size === 's' ? 's' : size === 'l' ? 'l' : 'm', color: getIconColor(), speed: 1, showLabel: false }), displayText && jsxRuntime.jsx("span", { children: displayText })] }));
|
|
2452
2458
|
}
|
|
2453
2459
|
// iconOnly 버튼일 때는 children을 아이콘으로 처리
|
|
2454
2460
|
if (iconOnly && children && React.isValidElement(children)) {
|