feat(SW-2285): Added campaign essentials block on campaign page
Approved-by: Christian Andolf Approved-by: Matilda Landström
This commit is contained in:
92
apps/scandic-web/components/Icons/IconByCSSelect.tsx
Normal file
92
apps/scandic-web/components/Icons/IconByCSSelect.tsx
Normal file
@@ -0,0 +1,92 @@
|
||||
import BouquetIcon from "@scandic-hotels/design-system/Icons/BouquetIcon"
|
||||
import DiscountIcon from "@scandic-hotels/design-system/Icons/DiscountIcon"
|
||||
import {
|
||||
MaterialIcon,
|
||||
type MaterialIconProps,
|
||||
} from "@scandic-hotels/design-system/Icons/MaterialIcon"
|
||||
import PalmTreeIcon from "@scandic-hotels/design-system/Icons/PalmTreeIcon"
|
||||
|
||||
import type { IconProps } from "@scandic-hotels/design-system/Icons"
|
||||
|
||||
interface IconByCSSelectProps extends IconProps {
|
||||
identifier: string
|
||||
}
|
||||
|
||||
export default function IconByCSSelect({
|
||||
identifier,
|
||||
color = "CurrentColor",
|
||||
size = 24,
|
||||
...props
|
||||
}: IconByCSSelectProps) {
|
||||
switch (identifier) {
|
||||
// These are custom icons
|
||||
case "discount-2-2":
|
||||
return <DiscountIcon size={size} color={color} {...props} />
|
||||
case "bouquet":
|
||||
return <BouquetIcon size={size} color={color} {...props} />
|
||||
case "palm_tree":
|
||||
return <PalmTreeIcon size={size} color={color} {...props} />
|
||||
|
||||
// These are all Material Icons
|
||||
case "electric_car":
|
||||
case "golf_course":
|
||||
case "museum":
|
||||
case "spa":
|
||||
case "airplane_ticket":
|
||||
case "apartment":
|
||||
case "attractions":
|
||||
case "award_star":
|
||||
case "beach_access":
|
||||
case "box":
|
||||
case "deck":
|
||||
case "directions_run":
|
||||
case "directions_subway":
|
||||
case "downhill_skiing":
|
||||
case "emoji_transportation":
|
||||
case "exercise":
|
||||
case "family_restroom":
|
||||
case "festival":
|
||||
case "forest":
|
||||
case "garage":
|
||||
case "hiking":
|
||||
case "houseboat":
|
||||
case "kayaking":
|
||||
case "landscape":
|
||||
case "location_city":
|
||||
case "location_on":
|
||||
case "loyalty":
|
||||
case "music_note":
|
||||
case "night_shelter":
|
||||
case "nightlife":
|
||||
case "pedal_bike":
|
||||
case "pets":
|
||||
case "pool":
|
||||
case "recommend":
|
||||
case "redeem":
|
||||
case "restaurant":
|
||||
case "sauna":
|
||||
case "sell":
|
||||
case "shopping_bag":
|
||||
case "sports_handball":
|
||||
case "sports_tennis":
|
||||
case "theater_comedy":
|
||||
case "things_to_do":
|
||||
case "tram":
|
||||
case "transit_ticket":
|
||||
case "travel":
|
||||
case "travel_luggage_and_bags":
|
||||
case "favorite":
|
||||
return (
|
||||
<MaterialIcon
|
||||
icon={identifier as MaterialIconProps["icon"]}
|
||||
size={size}
|
||||
color={color}
|
||||
{...props}
|
||||
/>
|
||||
)
|
||||
default:
|
||||
return (
|
||||
<MaterialIcon size={size} icon="favorite" color={color} {...props} />
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user