refactor: refresh

This commit is contained in:
2024-02-27 17:51:31 +00:00
parent 364d2c272f
commit f93a398039
75 changed files with 1434 additions and 2476 deletions

View File

@ -1,9 +1,8 @@
import "./async-button.css";
import { forwardRef, useState } from "react";
import Spinner from "./spinner";
import classNames from "classnames";
interface AsyncButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
export interface AsyncButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
disabled?: boolean;
onClick?: (e: React.MouseEvent) => Promise<void> | void;
children?: React.ReactNode;
@ -31,7 +30,7 @@ const AsyncButton = forwardRef<HTMLButtonElement, AsyncButtonProps>((props: Asyn
disabled={loading || props.disabled}
{...props}
onClick={handle}
className={classNames("px-3 py-2 bg-gray-2 rounded-full", props.className)}>
className={props.className}>
<span
style={{ visibility: loading ? "hidden" : "visible" }}
className="whitespace-nowrap flex gap-2 items-center justify-center">