-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import Loading from "src/components/Loading"; | ||
|
||
type ConnectButtonProps = { | ||
isConnecting: boolean; | ||
}; | ||
|
||
export default function ConnectButton({ isConnecting }: ConnectButtonProps) { | ||
return ( | ||
<button | ||
type="submit" | ||
className={`mt-4 inline-flex w-full gap-2 ${ | ||
isConnecting ? "bg-gray-300 dark:bg-gray-700" : "bg-purple-700" | ||
} cursor-pointer items-center justify-center rounded-md px-5 py-3 font-medium text-white shadow transition duration-150 hover:bg-purple-900 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 dark:text-neutral-200`} | ||
disabled={isConnecting} | ||
> | ||
{isConnecting ? ( | ||
<> | ||
<Loading /> Connecting... | ||
</> | ||
) : ( | ||
<>Connect</> | ||
)} | ||
</button> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters