Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/loud-actors-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-makeswift": minor
---

Now have the ability to make footer links open in new tabs
4 changes: 2 additions & 2 deletions core/lib/makeswift/components/site-footer/client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface Props {
title: string;
links: Array<{
label: string;
link: { href: string };
link: { href: string; target?: string };
}>;
}>;
copyright?: string;
Expand All @@ -57,7 +57,7 @@ function combineSections(
passedSections,
makeswiftSections.map(({ title, links }) => ({
title,
links: links.map(({ label, link }) => ({ label, href: link.href })),
links: links.map(({ label, link }) => ({ label, href: link.href, target: link.target })),
})),
(left, right) => ({ ...left, links: [...left.links, ...right.links] }),
);
Expand Down
3 changes: 3 additions & 0 deletions core/vibes/soul/sections/footer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ interface Image {
interface Link {
href: string;
label: string;
target?: string;
}

export interface Section {
Expand Down Expand Up @@ -175,6 +176,8 @@ export const Footer = ({
<Link
className="block rounded-lg py-2 text-sm font-medium text-[var(--footer-link,hsl(var(--contrast-500)))] ring-[var(--footer-focus,hsl(var(--primary)))] transition-colors duration-300 hover:text-[var(--footer-link-hover,hsl(var(--foreground)))] focus-visible:outline-0 focus-visible:ring-2"
href={link.href}
rel={link.target === '_blank' ? 'noopener noreferrer' : undefined}
target={link.target}
>
{link.label}
</Link>
Expand Down
Loading