Add support for more icons (#14299)

This commit is contained in:
Nicolas Mowen 2024-10-12 07:37:22 -06:00 committed by GitHub
parent 48c60621b6
commit 40bb4765d4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -7,16 +7,31 @@ import {
FaCarSide,
FaCat,
FaCheckCircle,
FaDhl,
FaDog,
FaFedex,
FaFire,
FaFootballBall,
FaHockeyPuck,
FaHorse,
FaMotorcycle,
FaMouse,
FaRegTrashAlt,
FaUmbrella,
FaUps,
FaUsps,
} from "react-icons/fa";
import { GiDeer, GiHummingbird, GiPolarBear, GiSailboat } from "react-icons/gi";
import {
GiDeer,
GiFox,
GiGoat,
GiHummingbird,
GiPolarBear,
GiPostStamp,
GiRabbit,
GiRaccoonHead,
GiSailboat,
} from "react-icons/gi";
import { LuBox, LuLassoSelect } from "react-icons/lu";
import * as LuIcons from "react-icons/lu";
import { MdRecordVoiceOver } from "react-icons/md";
@ -53,8 +68,12 @@ export function getIconForLabel(label: string, className?: string) {
case "bark":
case "dog":
return <FaDog key={label} className={className} />;
case "fire_alarm":
return <FaFire key={label} className={className} />;
case "fox":
return <GiFox key={label} className={className} />;
case "goat":
return <GiGoat key={label} className={className} />;
case "horse":
return <FaHorse key={label} className={className} />;
case "motorcycle":
return <FaMotorcycle key={label} className={className} />;
case "mouse":
@ -63,8 +82,20 @@ export function getIconForLabel(label: string, className?: string) {
return <LuBox key={label} className={className} />;
case "person":
return <BsPersonWalking key={label} className={className} />;
case "rabbit":
return <GiRabbit key={label} className={className} />;
case "raccoon":
return <GiRaccoonHead key={label} className={className} />;
case "robot_lawnmower":
return <FaHockeyPuck key={label} className={className} />;
case "sports_ball":
return <FaFootballBall key={label} className={className} />;
case "squirrel":
return <LuIcons.LuSquirrel key={label} className={className} />;
case "umbrella":
return <FaUmbrella key={label} className={className} />;
case "waste_bin":
return <FaRegTrashAlt key={label} className={className} />;
// audio
case "crying":
case "laughter":
@ -72,9 +103,21 @@ export function getIconForLabel(label: string, className?: string) {
case "speech":
case "yell":
return <MdRecordVoiceOver key={label} className={className} />;
case "fire_alarm":
return <FaFire key={label} className={className} />;
// sub labels
case "amazon":
return <FaAmazon key={label} className={className} />;
case "an_post":
case "dpd":
case "gls":
case "nzpost":
case "postnl":
case "postnord":
case "purolator":
return <GiPostStamp key={label} className={className} />;
case "dhl":
return <FaDhl key={label} className={className} />;
case "fedex":
return <FaFedex key={label} className={className} />;
case "ups":