-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove size limitation from text items on information screen in prepa…
…ration for allowing scrolling
- Loading branch information
Showing
51 changed files
with
206 additions
and
2,020 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
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 was deleted.
Oops, something went wrong.
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,71 @@ | ||
import React from 'react'; | ||
import ProgressBar from '~/lib/ui/components/ProgressBar'; | ||
import useReadyForNextStage from '~/lib/interviewer/hooks/useReadyForNextStage'; | ||
import { ChevronDown, ChevronUp, SettingsIcon } from 'lucide-react'; | ||
import { useInterview } from '~/providers/InterviewProvider'; | ||
import { cn } from '~/utils/shadcn'; | ||
|
||
const NavigationButton = ({ | ||
disabled, | ||
onClick, | ||
className, | ||
children, | ||
}: { | ||
disabled?: boolean; | ||
onClick?: React.MouseEventHandler<HTMLDivElement>; | ||
className?: string; | ||
children: React.ReactNode; | ||
}) => { | ||
return ( | ||
<div | ||
className={cn( | ||
`session-navigation__button m-4 flex h-[4.8rem] w-[4.8rem] basis-[4.8rem] cursor-pointer items-center justify-center rounded-full transition-all`, | ||
'hover:bg-[#4a4677]', | ||
disabled && 'cursor-not-allowed opacity-50 hover:bg-transparent', | ||
className, | ||
)} | ||
role="button" | ||
tabIndex={0} | ||
onClick={!disabled ? onClick : undefined} | ||
> | ||
{children} | ||
</div> | ||
); | ||
}; | ||
|
||
const Navigation = () => { | ||
const [isReadyForNextStage] = useReadyForNextStage(); | ||
const { progress, hasNextPage, hasPreviousPage, nextPage, previousPage } = | ||
useInterview(); | ||
|
||
return ( | ||
<div | ||
role="navigation" | ||
className="flex flex-shrink-0 flex-grow-0 flex-col items-center justify-between bg-[#36315f]" | ||
style={{ '--light-background': '#4a4677' }} // Progress bar uses this variable to set background | ||
> | ||
<NavigationButton> | ||
<SettingsIcon className="h-[2.4rem] w-[2.4rem]" /> | ||
</NavigationButton> | ||
<NavigationButton onClick={previousPage} disabled={!hasPreviousPage}> | ||
<ChevronUp className="h-[2.4rem] w-[2.4rem]" strokeWidth="3px" /> | ||
</NavigationButton> | ||
<div className="m-6 flex flex-grow"> | ||
<ProgressBar percentProgress={progress} /> | ||
</div> | ||
<NavigationButton | ||
className={cn( | ||
'bg-[var(--light-background)]', | ||
'hover:bg-[var(--primary)]', | ||
isReadyForNextStage && 'animate-pulse', | ||
)} | ||
onClick={nextPage} | ||
disabled={!hasNextPage} | ||
> | ||
<ChevronDown className="h-[2.4rem] w-[2.4rem]" strokeWidth="3px" /> | ||
</NavigationButton> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Navigation; |
107 changes: 0 additions & 107 deletions
107
lib/interviewer/components/SessionPanel/SessionNavigation.js
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.