@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.js
CHANGED
|
@@ -2404,7 +2404,7 @@ const Tooltip = ({ content, children, position = 'top', size = 'm', variant = 'd
|
|
|
2404
2404
|
};
|
|
2405
2405
|
Tooltip.displayName = 'Tooltip';
|
|
2406
2406
|
|
|
2407
|
-
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) => {
|
|
2407
|
+
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) => {
|
|
2408
2408
|
const ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
2409
2409
|
const { buttonProps } = $701a24aa0da5b062$export$ea18c227d4417cc3({
|
|
2410
2410
|
...props,
|
|
@@ -2449,7 +2449,13 @@ const Button = React.forwardRef(({ variant = 'primary', size = 'm', radius, full
|
|
|
2449
2449
|
};
|
|
2450
2450
|
const renderContent = () => {
|
|
2451
2451
|
if (loading) {
|
|
2452
|
-
|
|
2452
|
+
// 로딩 중 표시할 텍스트 결정: loadingText > children > 기본값
|
|
2453
|
+
const displayText = loadingText !== undefined
|
|
2454
|
+
? loadingText
|
|
2455
|
+
: (!iconOnly && children)
|
|
2456
|
+
? children
|
|
2457
|
+
: null;
|
|
2458
|
+
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 })] }));
|
|
2453
2459
|
}
|
|
2454
2460
|
// iconOnly 버튼일 때는 children을 아이콘으로 처리
|
|
2455
2461
|
if (iconOnly && children && React.isValidElement(children)) {
|