Show platform icons on link buttons
Links pick their platform from a preset dropdown (PLATFORMS in src/lib/platforms.ts), and every link button draws that platform's icon beside its label. The footer and event cards now share the same PlatformIcon component instead of their own copies. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
99c3a87c87
commit
3c02eb8971
11 changed files with 170 additions and 65 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import { useId, useState } from "react";
|
||||
import ArrowLink from "../../components/ArrowLink.tsx";
|
||||
import PlatformIcon from "../../components/PlatformIcon.tsx";
|
||||
import {
|
||||
areasSentence,
|
||||
initialsFor,
|
||||
|
|
@ -50,7 +51,7 @@ const FALLBACK_COLOR = "#4a6b72";
|
|||
function RowButton({ as: As = "button", color, children, ...rest }: any) {
|
||||
return (
|
||||
<As
|
||||
className="shrink-0 whitespace-nowrap py-2 px-4 rounded-xl font-700 text-sm transition-transform duration-200 hover:scale-105"
|
||||
className="inline-flex shrink-0 items-center gap-2 whitespace-nowrap py-2 px-4 rounded-xl font-700 text-sm transition-transform duration-200 hover:scale-105"
|
||||
style={{ border: `1px solid ${color}`, color }}
|
||||
{...rest}
|
||||
>
|
||||
|
|
@ -233,6 +234,7 @@ function OrgRow({ org, pageLabel, siteLabel }) {
|
|||
rel="noopener noreferrer"
|
||||
color={color}
|
||||
>
|
||||
<PlatformIcon platform={link.platform} />
|
||||
{link.label}
|
||||
</RowButton>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue