-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add spinner and finalize styles
- Loading branch information
Showing
6 changed files
with
53 additions
and
46 deletions.
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
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,8 @@ | ||
export default function Spinner() { | ||
return ( | ||
<svg className="animate-spin -ml-1 mr-3 h-5 w-5 text-white" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24"> | ||
<circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> | ||
<path className="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> | ||
</svg> | ||
); | ||
} |
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
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
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
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 |
---|---|---|
@@ -1,25 +1,27 @@ | ||
import { useState } from "react"; | ||
import CheckCircle from "@/components/icons/check-circle"; | ||
import Dismiss from "@/components/send-token-form/dismiss"; | ||
|
||
export default function Success({ | ||
message, | ||
hash, | ||
onDismissClick, | ||
blockExplorerUrl, | ||
}: { | ||
message: string; | ||
hash: string | undefined; | ||
onDismissClick: () => void; | ||
blockExplorerUrl: string | undefined; | ||
}) { | ||
return ( | ||
<div className="relative rounded-lg mt-5 justify-center items-center text-sm text-white p-5 bg-green-600 flex flex-row gap-2"> | ||
<Dismiss onDismissClick={onDismissClick} /> | ||
<CheckCircle /> | ||
{" "} | ||
{message} | ||
{" "} | ||
<div className="justify-left"> | ||
View <a className="underline m-0 p-0" href={`https://testnet.snowscan.xyz/tx/${hash}`} target="_blank">transaction</a>. | ||
</div> | ||
</div> | ||
); | ||
const [isDismissed, setIsDismissed] = useState(false); | ||
return !isDismissed && ( | ||
<div className="relative rounded-lg mt-5 justify-center items-center text-sm text-white p-5 bg-green-600 flex flex-row gap-2"> | ||
<Dismiss onDismissClick={() => { setIsDismissed(true) }} /> | ||
<CheckCircle /> | ||
{" "} | ||
{message} | ||
{" "} | ||
<div className="justify-left"> | ||
View <a className="underline m-0 p-0" href={`${blockExplorerUrl}/tx/${hash}`} target="_blank">transaction</a>. | ||
</div> | ||
</div> | ||
); | ||
} |