feat: dashboard
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
import "./async-button.css";
|
||||
import { useState } from "react";
|
||||
import Spinner from "./spinner";
|
||||
import classNames from "classnames";
|
||||
|
||||
interface AsyncButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
||||
disabled?: boolean;
|
||||
@ -28,7 +29,7 @@ export default function AsyncButton(props: AsyncButtonProps) {
|
||||
}
|
||||
|
||||
return (
|
||||
<button type="button" disabled={loading || props.disabled} {...props} onClick={handle}>
|
||||
<button disabled={loading || props.disabled} {...props} onClick={handle} className={classNames("px-3 py-2 bg-gray-2 rounded-full", props.className)}>
|
||||
<span style={{ visibility: loading ? "hidden" : "visible" }}>{props.children}</span>
|
||||
{loading && (
|
||||
<span className="spinner-wrapper">
|
||||
|
Reference in New Issue
Block a user