mirror of
https://github.com/wgh136/nysoure.git
synced 2025-09-28 20:47:23 +00:00
Add user management features.
This commit is contained in:
14
frontend/src/components/button.tsx
Normal file
14
frontend/src/components/button.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import { ReactNode } from "react";
|
||||
|
||||
export default function Button({ children, onClick, className, disabled, isLoading }: { children: ReactNode, onClick?: () => void, className?: string, disabled?: boolean, isLoading?: boolean }) {
|
||||
return <button
|
||||
className={`btn ${className} ${disabled ? "btn-disabled" : ""} h-9`}
|
||||
onClick={onClick}
|
||||
disabled={disabled}
|
||||
>
|
||||
{isLoading && <span className="loading loading-spinner loading-sm mr-2"></span>}
|
||||
<span className="text-sm">
|
||||
{children}
|
||||
</span>
|
||||
</button>;
|
||||
}
|
Reference in New Issue
Block a user