-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #94 from DemocracyDevelopers/feature/sample-dashbo…
…ard-page Feature/sample dashboard page
- Loading branch information
Showing
35 changed files
with
154 additions
and
78 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
import { useState } from "react"; | ||
import { FaInfoCircle } from "react-icons/fa"; | ||
import Link from "next/link"; | ||
|
||
interface TooltipWithIconProps { | ||
title: string; | ||
linkText: string; | ||
linkHref: string; | ||
description: string; | ||
} | ||
|
||
const TooltipWithIcon: React.FC<TooltipWithIconProps> = ({ | ||
title, | ||
linkText, | ||
linkHref, | ||
description, | ||
}) => { | ||
const [isTooltipVisible, setTooltipVisible] = useState(false); | ||
|
||
return ( | ||
<span | ||
className="ml-2 relative" | ||
onMouseEnter={() => setTooltipVisible(true)} | ||
onMouseLeave={() => setTooltipVisible(true)} // Keep tooltip open | ||
> | ||
{/* Information Icon */} | ||
<FaInfoCircle className="text-black cursor-pointer" size={18} /> | ||
|
||
{/* Tooltip Box */} | ||
{isTooltipVisible && ( | ||
<div className="absolute bg-white text-black text-sm rounded-lg shadow-lg py-3 px-5 left-full ml-2 w-64"> | ||
<div className="font-bold mb-2">{title}</div> | ||
<div className="font-normal"> | ||
{description}{" "} | ||
<Link | ||
href="/tutorial" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="text-blue-500 hover:underline" | ||
> | ||
Tutorial | ||
</Link> | ||
. | ||
</div> | ||
<button | ||
className="mt-4 text-gray-500 hover:text-gray-700" | ||
onClick={() => setTooltipVisible(false)} | ||
> | ||
Hide | ||
</button> | ||
</div> | ||
)} | ||
</span> | ||
); | ||
}; | ||
|
||
export default TooltipWithIcon; |
File renamed without changes.
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
2 changes: 1 addition & 1 deletion
2
...ashboard/components/AvatarAssignColor.tsx → ...hboard/components/avatar-assign-color.tsx
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
2 changes: 1 addition & 1 deletion
2
...rtions/components/DescribeRaireResult.tsx → ...ions/components/describe-raire-result.tsx
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
File renamed without changes.
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
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
app/tutorial/components/dataContent.js → app/tutorial/components/data-content.js
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
app/tutorial/components/TutorialContent.tsx → app/tutorial/components/tutorial-content.tsx
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
2 changes: 1 addition & 1 deletion
2
...ial/components/UsingAssertionsContent.tsx → ...l/components/using-assertions-content.tsx
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
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
File renamed without changes.
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,19 @@ | ||
import Link from "next/link"; | ||
|
||
const TermsAndPrivacy: React.FC = () => { | ||
return ( | ||
<p className="text-sm text-gray-500 text-center mt-4"> | ||
By sharing your files or using our service, you agree to our{" "} | ||
<Link href="#" className="underline hover:text-gray-800"> | ||
Terms of Service | ||
</Link>{" "} | ||
and{" "} | ||
<Link href="#" className="underline hover:text-gray-800"> | ||
Privacy Policy | ||
</Link> | ||
. | ||
</p> | ||
); | ||
}; | ||
|
||
export default TermsAndPrivacy; |
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,20 @@ | ||
import Link from "next/link"; | ||
|
||
interface HelpLinkProps { | ||
linkText: string; | ||
linkHref: string; | ||
} | ||
|
||
const TutorialLink: React.FC<HelpLinkProps> = ({ linkText, linkHref }) => { | ||
return ( | ||
<p className="text-center text-lg text-gray-600 my-4"> | ||
Need help? Click{" "} | ||
<Link href={linkHref} className="text-blue-600 hover:underline"> | ||
{linkText} | ||
</Link>{" "} | ||
for a tutorial. | ||
</p> | ||
); | ||
}; | ||
|
||
export default TutorialLink; |
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.