-
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.
feat: pad out icons folder with even more reusable icons
also hide the later parts of module sign in reaons
- Loading branch information
Showing
12 changed files
with
163 additions
and
88 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,46 @@ | ||
import { Location as LocationType } from "@ignis/types/training"; | ||
import { Heart, ParkingMeter, Wrench } from "lucide-react"; | ||
import React from "react"; | ||
import { IconWithTooltip } from "."; | ||
|
||
interface IconProps { | ||
className?: string; | ||
} | ||
|
||
export const Mainspace: React.FC<IconProps> = (props) => ( | ||
<IconWithTooltip {...props} IconComponent={Wrench} tooltipText="Mainspace" strokeClass="stroke-mainspace" /> | ||
); | ||
|
||
export const Heartspace: React.FC<IconProps> = (props) => ( | ||
<IconWithTooltip {...props} IconComponent={Heart} tooltipText="Heartspace" strokeClass="stroke-heartspace" /> | ||
); | ||
|
||
export const GeorgePorter: React.FC<IconProps> = (props) => ( | ||
<IconWithTooltip | ||
{...props} | ||
IconComponent={ParkingMeter} | ||
tooltipText="George Porter" | ||
strokeClass="stroke-george-porter" | ||
/> | ||
); | ||
|
||
export const Location: React.FC<IconProps & { location: Uppercase<LocationType> | Lowercase<LocationType> }> = ({ | ||
location, | ||
className, | ||
}) => { | ||
switch (location.toLowerCase() as Lowercase<LocationType>) { | ||
case "mainspace": | ||
return <MainspaceIcon className={className} />; | ||
case "heartspace": | ||
return <HeartspaceIcon className={className} />; | ||
case "george_porter": | ||
return <GeorgePorterIcon className={className} />; | ||
default: | ||
throw new Error("unreachable"); | ||
} | ||
}; | ||
|
||
export const MainspaceIcon = Mainspace; | ||
export const HeartspaceIcon = Heartspace; | ||
export const GeorgePorterIcon = GeorgePorter; | ||
export const LocationIcon = Location; |
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,24 @@ | ||
import { ReasonCategory } from "@ignis/types/sign_in"; | ||
import { Bot, Crown, GraduationCap, LucideIcon, PartyPopper, Rocket, UserRound } from "lucide-react"; | ||
|
||
export const Category = ({ category, ...props }: { category: ReasonCategory } & React.ComponentProps<LucideIcon>) => { | ||
switch (category) { | ||
case "UNIVERSITY_MODULE": | ||
return <GraduationCap {...props} />; | ||
case "PERSONAL_PROJECT": | ||
return <UserRound {...props} />; | ||
case "SOCIETY": | ||
// ROBOTEERS PLUG WOOO | ||
return <Bot {...props} />; | ||
case "REP_SIGN_IN": | ||
return <Crown {...props} />; | ||
case "CO_CURRICULAR_GROUP": | ||
return <Rocket {...props} />; | ||
case "EVENT": | ||
return <PartyPopper {...props} />; | ||
default: | ||
throw new Error("unreachable"); | ||
} | ||
}; | ||
|
||
export const CategoryIcon = Category; |
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,53 @@ | ||
import { removeSuffix } from "@/lib/utils"; | ||
import { | ||
BarChart4, | ||
Box, | ||
CalendarIcon, | ||
Cog, | ||
Computer, | ||
Construction, | ||
Diamond, | ||
Hammer, | ||
HardHat, | ||
LucideIcon, | ||
Megaphone, | ||
Puzzle, | ||
Send, | ||
Users, | ||
} from "lucide-react"; | ||
import * as React from "react"; | ||
|
||
export default function Team({ team, ...props }: { team: string } & React.ComponentProps<LucideIcon>) { | ||
switch (removeSuffix(team, "Team").trim()) { | ||
case "IT": | ||
return <Computer {...props} />; | ||
case "3DP": | ||
return <Box {...props} />; | ||
case "Hardware": | ||
return <Hammer {...props} />; | ||
case "Publicity": | ||
return <Megaphone {...props} />; | ||
case "Events": | ||
return <CalendarIcon {...props} />; | ||
case "Relations": | ||
return <Send {...props} />; | ||
case "Operations": | ||
return <Cog />; | ||
case "Recruitment & Development": | ||
return <BarChart4 {...props} />; // stonks? | ||
case "Health & Safety": | ||
return <HardHat {...props} />; | ||
case "Inclusions": | ||
return <Users {...props} />; | ||
case "Unsorted Reps": | ||
return <Puzzle {...props} />; | ||
case "Future Reps": | ||
return <Construction {...props} />; | ||
case "Staff": | ||
return <Diamond {...props} />; | ||
default: | ||
throw new Error("Sorry your team has been forgotten about... cry harder"); | ||
} | ||
} | ||
|
||
export const TeamIcon = Team; |
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
apps/forge/src/components/signin/dashboard/components/SignInsChart.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