Skip to content

Commit

Permalink
chore(storefront): add banner about version on next site (#2346)
Browse files Browse the repository at this point in the history
resolves #2344
  • Loading branch information
Barsnes authored Aug 29, 2024
1 parent 49af0ef commit 803744e
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion apps/storefront/app/(frontpage)/layout.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

.cluster {
position: absolute;
z-index: 0;
z-index: 3;
}

.cluster1,
Expand Down
2 changes: 1 addition & 1 deletion apps/storefront/app/(frontpage)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ const Layout = ({ children }: { children: React.ReactNode }) => {
>
<Container className={classes.container}>
<div className={classes.text}>
<div className={classes.betaTag}>Beta</div>
<div className={classes.betaTag}>Next</div>
<Heading size='lg'>
Designsystemet hjelper deg å lage gode digitale tjenester
</Heading>
Expand Down
2 changes: 2 additions & 0 deletions apps/storefront/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { Header } from '@repo/components';
import { Analytics } from '@vercel/analytics/react';
import type { Metadata } from 'next';

import { VersionBanner } from '@components';
import { Footer } from '../components/Footer/Footer';

export const metadata: Metadata = {
Expand Down Expand Up @@ -57,6 +58,7 @@ export default function RootLayout({
<html lang='en'>
<body>
<div className='root'>
<VersionBanner />
<Header menu={menu} />
{children}
<Footer />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
.banner {
background: var(--ds-color-brand2-surface-hover);
color: var(--ds-color-neutral-text-default);
display: grid;
place-items: center;
width: 100%;
height: var(--ds-sizing-12);
}
16 changes: 16 additions & 0 deletions apps/storefront/components/VersionBanner/VersionBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import cl from 'clsx/lite';
import React from 'react';
import classes from './VersionBanner.module.css';

function VersionBanner() {
return (
<a
href='https://v0.designsystemet.no'
className={cl(classes.banner, 'ds-focus')}
>
Gå til dokumentasjon for v0.63
</a>
);
}

export { VersionBanner };
1 change: 1 addition & 0 deletions apps/storefront/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ export { TokenList } from './Tokens';
export { Image } from './Image';
export { ComponentCard } from './ComponentCard';
export { GithubLink } from './GithubLink/GithubLink';
export { VersionBanner } from './VersionBanner/VersionBanner';

0 comments on commit 803744e

Please sign in to comment.