95 lines
2.8 KiB
JavaScript
95 lines
2.8 KiB
JavaScript
import {
|
|
require_jsx_dev_runtime
|
|
} from "/build/_shared/chunk-XGOTYLZ5.js";
|
|
import {
|
|
Link
|
|
} from "/build/_shared/chunk-RG2SZ2V3.js";
|
|
import {
|
|
createHotContext
|
|
} from "/build/_shared/chunk-73ZPIOGA.js";
|
|
import {
|
|
__toESM
|
|
} from "/build/_shared/chunk-PNG5AS42.js";
|
|
|
|
// app/components/ui/Button.tsx
|
|
var import_jsx_dev_runtime = __toESM(require_jsx_dev_runtime(), 1);
|
|
if (!window.$RefreshReg$ || !window.$RefreshSig$ || !window.$RefreshRuntime$) {
|
|
console.warn("remix:hmr: React Fast Refresh only works when the Remix compiler is running in development mode.");
|
|
} else {
|
|
prevRefreshReg = window.$RefreshReg$;
|
|
prevRefreshSig = window.$RefreshSig$;
|
|
window.$RefreshReg$ = (type, id) => {
|
|
window.$RefreshRuntime$.register(type, '"app\\\\components\\\\ui\\\\Button.tsx"' + id);
|
|
};
|
|
window.$RefreshSig$ = window.$RefreshRuntime$.createSignatureFunctionForTransform;
|
|
}
|
|
var prevRefreshReg;
|
|
var prevRefreshSig;
|
|
if (import.meta) {
|
|
import.meta.hot = createHotContext(
|
|
//@ts-expect-error
|
|
"app\\components\\ui\\Button.tsx"
|
|
);
|
|
import.meta.hot.lastModified = "1742800194232.612";
|
|
}
|
|
function Button({
|
|
children,
|
|
type = "default",
|
|
size = "medium",
|
|
to,
|
|
icon,
|
|
disabled = false,
|
|
className = "",
|
|
onClick,
|
|
...rest
|
|
}) {
|
|
const baseClasses = "ant-btn";
|
|
const typeClasses = {
|
|
primary: "ant-btn-primary",
|
|
default: "ant-btn-default",
|
|
danger: "ant-btn-danger"
|
|
};
|
|
const sizeClasses = {
|
|
small: "ant-btn-sm",
|
|
medium: "",
|
|
large: "text-base px-5 py-2.5"
|
|
};
|
|
const classes = [baseClasses, typeClasses[type], sizeClasses[size], disabled ? "opacity-50 cursor-not-allowed" : "", className].filter(Boolean).join(" ");
|
|
if (to) {
|
|
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)(Link, { to, className: classes, ...rest, children: [
|
|
icon && /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("i", { className: `${icon} mr-1.5` }, void 0, false, {
|
|
fileName: "app/components/ui/Button.tsx",
|
|
lineNumber: 48,
|
|
columnNumber: 18
|
|
}, this),
|
|
children
|
|
] }, void 0, true, {
|
|
fileName: "app/components/ui/Button.tsx",
|
|
lineNumber: 47,
|
|
columnNumber: 12
|
|
}, this);
|
|
}
|
|
return /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("button", { className: classes, disabled, onClick, ...rest, children: [
|
|
icon && /* @__PURE__ */ (0, import_jsx_dev_runtime.jsxDEV)("i", { className: `${icon} mr-1.5` }, void 0, false, {
|
|
fileName: "app/components/ui/Button.tsx",
|
|
lineNumber: 53,
|
|
columnNumber: 16
|
|
}, this),
|
|
children
|
|
] }, void 0, true, {
|
|
fileName: "app/components/ui/Button.tsx",
|
|
lineNumber: 52,
|
|
columnNumber: 10
|
|
}, this);
|
|
}
|
|
_c = Button;
|
|
var _c;
|
|
$RefreshReg$(_c, "Button");
|
|
window.$RefreshReg$ = prevRefreshReg;
|
|
window.$RefreshSig$ = prevRefreshSig;
|
|
|
|
export {
|
|
Button
|
|
};
|
|
//# sourceMappingURL=/build/_shared/chunk-OGUYUMUT.js.map
|