Skip to content

Commit 299c4aa

Browse files
committed
revert: removal of color class mapping
use `[&svg]:` to style SVG from parent as-needed
1 parent 2f31f14 commit 299c4aa

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/components/SocialListItem.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ import {
99

1010
import { cn } from "@/lib/utils/cn"
1111

12+
const socialColorClasses = {
13+
reddit: "text-[#ff4301]",
14+
twitter: "text-[#1da1f2]",
15+
youtube: "text-[#ff0000]",
16+
discord: "text-[#7289da]",
17+
stackExchange: "text-[#48a2da]",
18+
}
19+
1220
const icons = {
1321
reddit: FaRedditAlien,
1422
twitter: FaXTwitter,
@@ -30,7 +38,7 @@ const SocialListItem = ({
3038
const Icon = icons[socialIcon]
3139
return (
3240
<div className={cn("flex w-full items-center px-0 py-2", className)}>
33-
<Icon className={cn("size-10 pe-3 text-body")} />
41+
<Icon className={cn("size-10 pe-3", socialColorClasses[socialIcon])} />
3442
<div className="font-normal italic">{children}</div>
3543
</div>
3644
)

0 commit comments

Comments
 (0)