Skip to content

Commit 073c1db

Browse files
committedMar 20, 2025·
legg til knapp for å lukke versjonsvelgeren
1 parent fae8337 commit 073c1db

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed
 

‎xp-archive/client/versionSelector/SlidePanel/SlidePanel.module.css

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
}
1818

1919
.panel {
20+
display: flex;
21+
flex-direction: column;
2022
position: relative;
2123
z-index: 1;
2224
width: 460px;

‎xp-archive/client/versionSelector/VersionSelector.module.css

+11
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,14 @@
4040
font-weight: var(--a-font-weight-bold);
4141
}
4242
}
43+
44+
.closeButton {
45+
position: sticky;
46+
bottom: 1rem;
47+
margin-top: 1.75rem;
48+
49+
width: fit-content;
50+
border-radius: 99px;
51+
background-color: var(--a-surface-inverted);
52+
align-self: center;
53+
}

‎xp-archive/client/versionSelector/VersionSelector.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import React, { useState, useEffect } from 'react';
2+
import { CheckmarkIcon, XMarkIcon } from '@navikt/aksel-icons';
23
import { Heading, Button, Search } from '@navikt/ds-react';
34
import { VersionReference } from 'shared/types';
45
import { formatTimestamp } from '@common/shared/timestamp';
56
import { useAppState } from 'client/context/appState/useAppState';
67
import { SlidePanel } from './SlidePanel/SlidePanel';
78
import { classNames } from '@common/client/utils/classNames';
89
import style from './VersionSelector.module.css';
9-
import { CheckmarkIcon } from '@navikt/aksel-icons';
1010

1111
type Props = {
1212
versions: VersionReference[];
@@ -87,6 +87,14 @@ export const VersionSelector = ({ versions, isOpen, onClose, onMount }: Props) =
8787
</VersionButton>
8888
))}
8989
</div>
90+
<Button
91+
className={style.closeButton}
92+
variant="primary-neutral"
93+
icon={<XMarkIcon />}
94+
onClick={handleClose}
95+
>
96+
Lukk versjonsvelger
97+
</Button>
9098
</SlidePanel>
9199
);
92100

0 commit comments

Comments
 (0)
Please sign in to comment.