File tree 4 files changed +13
-15
lines changed
packages/nextjs/src/components
4 files changed +13
-15
lines changed Original file line number Diff line number Diff line change 1
- .contactPageHeader {
1
+ .headerContainer {
2
2
display : flex ;
3
3
flex-direction : column ;
4
4
justify-content : center ;
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { BodyShort, Heading } from '@navikt/ds-react';
2
2
import { ProductDataMixin } from 'types/component-props/_mixins' ;
3
3
import { ContentProps } from 'types/content-props/_content-common' ;
4
4
import { classNames } from 'utils/classnames' ;
5
- import style from './ContactPageHeader .module.scss' ;
5
+ import style from './HeaderWithParent .module.scss' ;
6
6
7
7
type Props = {
8
8
contentProps : Pick < ContentProps , 'data' > & {
@@ -12,11 +12,11 @@ type Props = {
12
12
className ?: string ;
13
13
} ;
14
14
15
- export const ContactPageHeader = ( { contentProps, textAboveTitle, className } : Props ) => {
15
+ export const HeaderWithParent = ( { contentProps, textAboveTitle, className } : Props ) => {
16
16
const { data } = contentProps ;
17
17
18
18
return (
19
- < div className = { classNames ( style . contactPageHeader , className ) } >
19
+ < div className = { classNames ( style . headerContainer , className ) } >
20
20
< BodyShort textColor = "subtle" className = { style . textAboveTitle } >
21
21
{ textAboveTitle }
22
22
</ BodyShort >
Original file line number Diff line number Diff line change @@ -23,7 +23,11 @@ const getDescription = (content: ContentProps) => {
23
23
return description . slice ( 0 , DESCRIPTION_MAX_LENGTH ) ;
24
24
} ;
25
25
26
- const contentTypesWithNoIndex = new Set ( [ ContentType . Error , ContentType . FormIntermediateStepPage ] ) ;
26
+ const contentTypesWithNoIndex = new Set ( [
27
+ ContentType . Error ,
28
+ ContentType . FormIntermediateStepPage ,
29
+ ContentType . ContactStepPage ,
30
+ ] ) ;
27
31
28
32
const isNoIndex = ( content : ContentProps ) =>
29
33
content . isPagePreview || contentTypesWithNoIndex . has ( content . type ) || content . data ?. noindex ;
Original file line number Diff line number Diff line change 1
1
import { BodyShort , Heading , LinkPanel } from '@navikt/ds-react' ;
2
- import { ContactPageHeader } from 'components/_common/headers/contactPageHeader/ContactPageHeader ' ;
2
+ import { HeaderWithParent } from 'components/_common/headers/headerWithParent/HeaderWithParent ' ;
3
3
import { ParsedHtml } from 'components/_common/parsedHtml/ParsedHtml' ;
4
4
import { ContentType , ContentCommonProps } from 'types/content-props/_content-common' ;
5
5
import { IllustrationStatic } from 'components/_common/illustration/static/IllustrationStatic' ;
@@ -23,8 +23,7 @@ export type ContactStepPageProps = ContentCommonProps & {
23
23
} ;
24
24
} ;
25
25
26
- export const ContactStepPage = ( props : ContactStepPageProps ) => {
27
- const { data } = props ;
26
+ export const ContactStepPage = ( { data } : ContactStepPageProps ) => {
28
27
const {
29
28
title,
30
29
illustration,
@@ -39,13 +38,8 @@ export const ContactStepPage = (props: ContactStepPageProps) => {
39
38
return (
40
39
< div className = { style . contactStepPage } >
41
40
< IllustrationStatic illustration = { illustration } className = { style . pictogram } />
42
- < ContactPageHeader
43
- contentProps = { {
44
- data : {
45
- title,
46
- illustration,
47
- } ,
48
- } }
41
+ < HeaderWithParent
42
+ contentProps = { { data : { title, illustration } } }
49
43
textAboveTitle = { textAboveTitle }
50
44
className = { style . header }
51
45
/>
You can’t perform that action at this time.
0 commit comments