fix: login improvement (#941)

This commit is contained in:
Matri
2023-08-21 21:26:32 +08:00
committed by GitHub
parent e0a48c4972
commit 062e2e915b
2 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ export type IButtonProps = {
className?: string
disabled?: boolean
loading?: boolean
tabIndex?: number
children: React.ReactNode
onClick?: MouseEventHandler<HTMLDivElement>
}
@@ -18,6 +19,7 @@ const Button: FC<IButtonProps> = ({
className,
onClick,
loading = false,
tabIndex,
}) => {
let style = 'cursor-pointer'
switch (type) {
@@ -35,6 +37,7 @@ const Button: FC<IButtonProps> = ({
return (
<div
className={`inline-flex justify-center items-center content-center h-9 leading-5 rounded-lg px-4 py-2 text-base ${style} ${className && className}`}
tabIndex={tabIndex}
onClick={disabled ? undefined : onClick}
>
{children}