Skip to content

Commit 5aa6511

Browse files
committed
more external link icon changes
1 parent 1fbc175 commit 5aa6511

4 files changed

Lines changed: 13 additions & 9 deletions

File tree

packages/app/src/components/media/media-content.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function MediaCard({ title, organization, url, type, date }: MediaItem) {
5151
>
5252
<h3 className="text-sm sm:text-base lg:text-lg font-medium leading-snug text-foreground group-hover:text-primary transition-colors italic group-hover:underline">
5353
&ldquo;{title}&rdquo;
54-
<ExternalLinkIcon className="ml-1.5 inline-block h-[0.85em] w-[0.85em] opacity-50 group-hover:opacity-100 transition-opacity" />
54+
<ExternalLinkIcon />
5555
</h3>
5656
</a>
5757
</div>

packages/app/src/components/quote-carousel.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,10 @@ function QuoteBlock({ quote }: { quote: CarouselQuote }) {
8080
href={quote.link}
8181
target="_blank"
8282
rel="noopener noreferrer"
83-
className="font-semibold text-foreground hover:text-brand transition-colors group/link"
83+
className="font-semibold text-foreground hover:text-brand transition-colors group"
8484
>
85-
<span className="group-hover/link:underline">{quote.name}</span>{' '}
86-
<ExternalLinkIcon className="ml-1 inline-block h-[0.85em] w-[0.85em]" />
85+
<span className="group-hover:underline">{quote.name}</span>
86+
<ExternalLinkIcon />
8787
</a>
8888
) : (
8989
<span className="font-semibold text-foreground">{quote.name}</span>

packages/app/src/components/quotes/quotes-content.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ function QuoteCard({
3636
href={link}
3737
target="_blank"
3838
rel="noopener noreferrer"
39-
className="font-semibold text-foreground hover:text-brand transition-colors group/link"
39+
className="font-semibold text-foreground hover:text-brand transition-colors group"
4040
>
41-
<span className="group-hover/link:underline">{name}</span>{' '}
42-
<ExternalLinkIcon className="ml-1 inline-block h-[0.85em] w-[0.85em] align-middle" />
41+
<span className="group-hover:underline">{name}</span>
42+
<ExternalLinkIcon />
4343
</a>
4444
) : (
4545
<span className="font-semibold text-foreground">{name}</span>

packages/app/src/components/ui/external-link-icon.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ interface ExternalLinkIconProps extends React.SVGProps<SVGSVGElement> {
77
}
88

99
const ExternalLinkIcon = React.forwardRef<SVGSVGElement, ExternalLinkIconProps>(
10-
({ className, ...props }, ref) => (
10+
({ className, style, ...props }, ref) => (
1111
<svg
1212
ref={ref}
13-
className={cn('ml-1 inline-block h-[1em] w-[1em]', className)}
13+
className={cn(
14+
'inline h-[0.85em] w-[0.85em] ml-1 shrink-0 opacity-50 group-hover:opacity-100 transition-opacity',
15+
className,
16+
)}
17+
style={{ verticalAlign: '-0.125em', ...style }}
1418
fill="none"
1519
stroke="currentColor"
1620
viewBox="0 0 24 24"

0 commit comments

Comments
 (0)