Skip to content

Commit ff6a5ec

Browse files
committed
Legger til støtte for forhåndsvisning av varsel i kontekst
1 parent 9d03c76 commit ff6a5ec

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

src/components/ContentMapper.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import { FormsOverviewPage } from 'components/pages/forms-overview-page/FormsOve
2929
import { VideoPage } from './pages/video-page/VideoPage';
3030
import { CalculatorPage } from './pages/calculator-page/CalculatorPage';
3131
import { UserTestsConfigPreviewPage } from 'components/pages/user-tests-config-preview-page/UserTestsConfigPreviewPage';
32+
import { AlertInContextPage } from './pages/alert-in-context-page/AlertInContextPage';
3233

3334
const contentToReactComponent: {
3435
[key in ContentType]?: React.FunctionComponent<ContentProps<key>>;
@@ -59,6 +60,7 @@ const contentToReactComponent: {
5960
[ContentType.FormsOverview]: FormsOverviewPage,
6061
[ContentType.Calculator]: CalculatorPage,
6162
[ContentType.UserTestsConfig]: UserTestsConfigPreviewPage,
63+
[ContentType.AlertInContext]: AlertInContextPage,
6264

6365
[ContentType.AreaPage]: DynamicPage,
6466
[ContentType.FrontPage]: DynamicPage,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
@use 'common' as common;
2+
3+
$margin: 2rem;
4+
5+
.alertInContextPage {
6+
display: flex;
7+
flex-direction: column;
8+
max-width: common.$sectionMaxWidth;
9+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react';
2+
import { ComponentMapper } from '../../ComponentMapper';
3+
4+
import { AlertInContextPageProps } from 'types/content-props/alerts';
5+
import { ThemedPageHeader } from '../../_common/headers/themed-page-header/ThemedPageHeader';
6+
7+
import style from './AlertInContextPage.module.scss';
8+
import { AlertInContext } from 'components/_common/alert-in-context/AlertInContext';
9+
10+
export const AlertInContextPage = (props: AlertInContextPageProps) => {
11+
return (
12+
<div className={style.alertInContextPage}>
13+
<AlertInContext alert={props} />
14+
</div>
15+
);
16+
};

0 commit comments

Comments
 (0)