Skip to content

Commit

Permalink
Replace DaisyUI spinner with custom component
Browse files Browse the repository at this point in the history
  • Loading branch information
TorstenStueber committed Nov 8, 2024
1 parent 62b3bf2 commit 94d6d74
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/components/SigningBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { FC } from 'preact/compat';
import accountBalanceWalletIcon from '../../assets/account-balance-wallet.svg';

import { SigningPhase } from '../../hooks/useMainProcess';
import { Spinner } from '../Spinner';

const progressValues: Record<SigningPhase, string> = {
started: '25',
Expand Down Expand Up @@ -52,7 +53,7 @@ export const SigningBox: FC<SigningBoxProps> = ({ step }) => {
</div>
</main>
<footer className="flex items-center justify-center bg-[#5E88D5] text-white rounded-b">
<span className="loading loading-spinner loading-sm"></span>
<Spinner />
<p className="ml-2.5 my-2 text-xs">Waiting for signature {getSignatureNumber(step)}/2</p>
</footer>
</div>
Expand Down
3 changes: 3 additions & 0 deletions src/components/Spinner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function Spinner() {
return <div className="border-white border-t-transparent rounded-full animate-spin border-[2.5px] w-5 h-5" />;
}
3 changes: 2 additions & 1 deletion src/components/buttons/SwapSubmitButton/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { ConnectButton } from '@rainbow-me/rainbowkit';
import { FC } from 'preact/compat';
import { Spinner } from '../../Spinner';

interface SwapSubmitButtonProps {
text: string;
Expand Down Expand Up @@ -32,7 +33,7 @@ export const SwapSubmitButton: FC<SwapSubmitButtonProps> = ({ text, disabled, pe

return (
<button className="w-full mt-5 btn-vortex-primary btn" disabled={showInDisabledState}>
{pending && <span className="loading loading-spinner loading-sm"></span>}
{pending && <Spinner />}
{text}
</button>
);
Expand Down

0 comments on commit 94d6d74

Please sign in to comment.