generated from UoaWDCC/react-template
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Showing
22 changed files
with
154 additions
and
156 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 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
11 changes: 6 additions & 5 deletions
11
web/src/components/Dashboard/DashboardMain/DashboardDashboard.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
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 |
---|---|---|
@@ -1,27 +1,31 @@ | ||
|
||
type SideBarTabProps = { | ||
unselected: string; | ||
selected: string; | ||
tabName: string; | ||
selectedTab: string; | ||
setSelectedTab: (tab: string) => void; | ||
switchPage: () => void | ||
unselected: string; | ||
selected: string; | ||
tabName: string; | ||
selectedTab: string; | ||
setSelectedTab: (tab: string) => void; | ||
switchPage: () => void | ||
}; | ||
|
||
const SideBarTab: React.FC<SideBarTabProps> = ({ unselected, selected, tabName, selectedTab, setSelectedTab, switchPage }) => { | ||
const baseTabStyle = "flex flex-row gap-2 items-center hover:no-underline w-[190px] h-[84px] transition-all duration-[400] mask-tab my-[-3px]" | ||
const tRCorner = " before:content-[''] before:absolute before:h-[40px] before:w-[20px] before:bg-transparent before:top-[-40px] before:right-0 before:rounded-br-full before:shadow-invTR before:duration-[500ms] before:ease-in" | ||
const bRCorner = " after:content-[''] after:absolute after:h-[40px] after:w-[20px] after:bg-transparent after:bottom-[-40px] after:right-0 after:rounded-tr-full after:shadow-invBR after:z-50 after:duration-[500ms] after:ease-in" | ||
const baseTabStyle = "dashboard hover:no-underline w-[210px] h-[70px] transition-colors duration-[400ms] rounded-l-full relative sm:max-2xl:w-[90px]" + tRCorner + bRCorner | ||
|
||
return ( | ||
<button className={selectedTab === tabName ? baseTabStyle + " bg-[#F7F7FB] text-primary" : baseTabStyle + " bg-primary hover:bg-[#ffffff40] text-white"} onClick={() => { | ||
setSelectedTab(tabName) | ||
switchPage()}}> | ||
<div className="w-auto h-auto"> | ||
<img className="w-[25px] h-[25px]" src={selectedTab === tabName ? selected : unselected} alt={tabName + " icon"} /> | ||
</div> | ||
<h3 className="font-sans text-[14px] m-0 capitalize text-nowrap mt-[6px]">{tabName}</h3> | ||
</button> | ||
); | ||
return ( | ||
<button className={selectedTab === tabName ? baseTabStyle + " bg-[#F7F7FB] text-primary": baseTabStyle + " bg-primary hover:bg-[#ffffff40] text-white rounded-r-lg after:opacity-0 before:opacity-0 before:transition-none after:transition-none"} onClick={() => { | ||
setSelectedTab(tabName) | ||
switchPage() | ||
}}> | ||
<div className="flex flex-row gap-2 items-center ml-4"> | ||
<img className="w-[25px] h-[25px]" src={selectedTab === tabName ? selected : unselected} alt={tabName + " icon"} /> | ||
<h3 className="font-sans text-[14px] m-0 capitalize text-nowrap mt-[6px] sm:max-2xl:hidden">{tabName}</h3> | ||
</div> | ||
|
||
</button> | ||
); | ||
}; | ||
|
||
export default SideBarTab; | ||
|
2 changes: 1 addition & 1 deletion
2
web/src/components/Dashboard/dashboardCalendar/DashboardCalendar.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
Oops, something went wrong.