-
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.
- Loading branch information
1 parent
376e4dd
commit cf7d382
Showing
9 changed files
with
1,524 additions
and
178 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,62 @@ | ||
"use client"; | ||
import React, { useState } from "react"; | ||
import { MultiStepLoader as Loader } from "./ui/multi-step-loader"; | ||
import { IconSquareRoundedX } from "@tabler/icons-react"; | ||
|
||
const loadingStates = [ | ||
{ | ||
text: "Buying a condo", | ||
}, | ||
{ | ||
text: "Travelling in a flight", | ||
}, | ||
{ | ||
text: "Meeting Tyler Durden", | ||
}, | ||
{ | ||
text: "He makes soap", | ||
}, | ||
{ | ||
text: "We goto a bar", | ||
}, | ||
{ | ||
text: "Start a fight", | ||
}, | ||
{ | ||
text: "We like it", | ||
}, | ||
{ | ||
text: "Welcome to F**** C***", | ||
}, | ||
]; | ||
|
||
export function MultiStepLoader() { | ||
const [loading, setLoading] = useState(false); | ||
return ( | ||
<div className="w-full h-40 flex items-center justify-center"> | ||
{/* Core Loader Modal */} | ||
<Loader loadingStates={loadingStates} loading={loading} duration={2000} /> | ||
|
||
{/* The buttons are for demo only, remove it in your actual code ⬇️ */} | ||
<button | ||
onClick={() => setLoading(true)} | ||
className="bg-six hover:bg-seven text-four mx-auto text-sm md:text-base transition font-medium duration-200 h-10 rounded-lg px-8 flex items-center justify-center" | ||
style={{ | ||
boxShadow: | ||
"0px -1px 0px 0px #ffffff40 inset, 0px 1px 0px 0px #ffffff40 inset", | ||
}} | ||
> | ||
Click to load | ||
</button> | ||
|
||
{loading && ( | ||
<button | ||
className="fixed top-4 right-4 text-black dark:text-white z-[120]" | ||
onClick={() => setLoading(false)} | ||
> | ||
<IconSquareRoundedX className="h-10 w-10" /> | ||
</button> | ||
)} | ||
</div> | ||
); | ||
} |
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
Oops, something went wrong.