Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
43 lines
1.1 KiB
Plaintext
43 lines
1.1 KiB
Plaintext
"use client";
|
|
import {
|
|
useButton
|
|
} from "./chunk-JLZ7IZPR.mjs";
|
|
|
|
// src/button.tsx
|
|
import { Spinner } from "@heroui/spinner";
|
|
import { Ripple } from "@heroui/ripple";
|
|
import { forwardRef } from "@heroui/system";
|
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
var Button = forwardRef((props, ref) => {
|
|
const {
|
|
Component,
|
|
domRef,
|
|
children,
|
|
styles,
|
|
spinnerSize,
|
|
spinner = /* @__PURE__ */ jsx(Spinner, { color: "current", size: spinnerSize }),
|
|
spinnerPlacement,
|
|
startContent,
|
|
endContent,
|
|
isLoading,
|
|
disableRipple,
|
|
getButtonProps,
|
|
getRippleProps,
|
|
isIconOnly
|
|
} = useButton({ ...props, ref });
|
|
return /* @__PURE__ */ jsxs(Component, { ref: domRef, className: styles, ...getButtonProps(), children: [
|
|
startContent,
|
|
isLoading && spinnerPlacement === "start" && spinner,
|
|
isLoading && isIconOnly ? null : children,
|
|
isLoading && spinnerPlacement === "end" && spinner,
|
|
endContent,
|
|
!disableRipple && /* @__PURE__ */ jsx(Ripple, { ...getRippleProps() })
|
|
] });
|
|
});
|
|
Button.displayName = "HeroUI.Button";
|
|
var button_default = Button;
|
|
|
|
export {
|
|
button_default
|
|
};
|