-
Notifications
You must be signed in to change notification settings - Fork 107
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: conditionally highlight each phase on the roadmap (#1290)
- Loading branch information
1 parent
c2408ca
commit 7c15e90
Showing
2 changed files
with
69 additions
and
47 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,34 @@ | ||
import clsx from "clsx"; | ||
import { FaCircleCheck } from "react-icons/fa6"; | ||
|
||
type RoadmapPhaseProps = { | ||
phase: string; | ||
active?: boolean; | ||
children: React.ReactNode; | ||
}; | ||
|
||
export const RoadmapPhase = ({ | ||
phase, | ||
active, | ||
children, | ||
}: RoadmapPhaseProps): JSX.Element => { | ||
const disabledClassName = !active && "opacity-25"; | ||
return ( | ||
<li | ||
className={clsx( | ||
"flex flex-col items-center text-center uppercase text-yellow my-2" | ||
)} | ||
> | ||
<i className="w-0.5 h-3.5 bg-yellow mb-1.5" /> | ||
<span className={clsx("block text-[13px] mb-1", disabledClassName)}> | ||
Phase {phase} | ||
</span> | ||
<div>{children}</div> | ||
{active && ( | ||
<i className="my-1"> | ||
<FaCircleCheck /> | ||
</i> | ||
)} | ||
</li> | ||
); | ||
}; |
7c15e90
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Published on https://namada-interface-dev.netlify.app as production
🚀 Deployed on https://673f7aea07ba31513bb2b671--namada-interface-dev.netlify.app