Skip to content

Commit

Permalink
🎨 Fikset h2 bruk på nettsiden (#2350)
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Oct 10, 2023
1 parent 732a049 commit fcbf6ea
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 41 deletions.
11 changes: 9 additions & 2 deletions aksel.nav.no/website/components/SanityBlockContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
Bilde,
CodeExamples,
DoDont,
LevelTwoHeading,
PropsSeksjon,
RelatertInnhold,
SideModul,
Expand Down Expand Up @@ -236,7 +235,15 @@ function SanitizedBlock({
);
case "h2":
return (
<LevelTwoHeading id={`h${value._key}`}>{children}</LevelTwoHeading>
<Heading
tabIndex={-1}
id={`h${value._key}`}
level="2"
size="large"
className="max-w-text text-deepblue-800 mb-4 mt-12 scroll-mt-20 first-of-type:mt-0 focus:outline-none"
>
{children}
</Heading>
);
case "h3":
return (
Expand Down
1 change: 0 additions & 1 deletion aksel.nav.no/website/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@ export * from "./sanity-modules/UuFeedback";
export { default as Video } from "./sanity-modules/Video";
export * from "./website-modules/BreadCrumbs";
export { default as Feedback } from "./website-modules/feedback";
export * from "./website-modules/H2";
export * from "./website-modules/toc/TOC";
export * from "./website-modules/utils";
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { LevelTwoHeading } from "@/components";
import { withErrorBoundary } from "@/error-boundary";
import { SanityBlockContent } from "@/sanity-block";
import { AkselGrunnleggendeDocT, AkselKomponentDocT } from "@/types";
import { Label } from "@navikt/ds-react";
import React from "react";

const Intro = ({
node,
Expand All @@ -18,9 +16,9 @@ const Intro = ({

return (
<div className="mb-16">
<LevelTwoHeading hidden id="intro">
<h2 id="intro" className="sr-only">
Intro
</LevelTwoHeading>
</h2>
<SanityBlockContent blocks={node.body} />
<div className="mt-7">
<Label as="p" className="mb-3">
Expand Down
34 changes: 0 additions & 34 deletions aksel.nav.no/website/components/website-modules/H2.tsx

This file was deleted.

0 comments on commit fcbf6ea

Please sign in to comment.