Skip to content

Commit f597dd1

Browse files
authored
Merge pull request #1811 from navikt/alternative-audience-v2
AlternativeAudienceV2
2 parents 46b613d + a258d52 commit f597dd1

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

src/components/_common/alternativeAudience/AlternativeAudience.module.scss

+10
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,13 @@
55
margin-top: 0;
66
}
77
}
8+
9+
.alternativeAudienceV2 {
10+
margin-top: 1.75rem;
11+
padding: 0.75rem 1rem;
12+
13+
border-style: solid;
14+
border-width: 1px;
15+
border-radius: 0.5rem;
16+
border-color: rgb(203 213 225);
17+
}

src/components/_common/alternativeAudience/AlternativeAudience.tsx

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import { Language, translator } from 'translations';
1010
import { LenkeInline } from 'components/_common/lenke/LenkeInline';
1111
import { stripXpPathPrefix } from 'utils/urls';
1212
import { getConjunction, joinWithConjunction } from 'utils/string';
13+
import { ContentType } from 'types/content-props/_content-common';
1314

1415
import style from './AlternativeAudience.module.scss';
1516

@@ -29,7 +30,7 @@ export const AlternativeAudience = ({
2930
productName,
3031
showProductName,
3132
}: Props) => {
32-
const { language, editorView } = usePageContentProps();
33+
const { language, editorView, type } = usePageContentProps();
3334

3435
const getRelatedString = translator('related', language);
3536
const getStringPart = translator('stringParts', language);
@@ -41,7 +42,9 @@ export const AlternativeAudience = ({
4142
return (
4243
<div
4344
className={classNames(
44-
style.alternativeAudience,
45+
type == ContentType.ProductPageV2
46+
? style.alternativeAudienceV2
47+
: style.alternativeAudience,
4548
editorView === 'edit' && style.noMargin
4649
)}
4750
>

0 commit comments

Comments
 (0)