Skip to content

Commit 13abdf5

Browse files
committed
Tweaker tekster/styling
1 parent 2e4a8a5 commit 13abdf5

File tree

2 files changed

+27
-18
lines changed

2 files changed

+27
-18
lines changed

src/components/main-section/content-view/html-exporter/HtmlExporter.module.css

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
.exporter {
2-
overflow-y: scroll;
2+
display: flex;
3+
flex-direction: column;
4+
overflow-y: hidden;
35
height: 100%;
4-
scrollbar-width: thin;
56
}
67

78
.hidden {
@@ -17,7 +18,7 @@
1718
padding: 0.5rem 0;
1819
}
1920

20-
.downloadCurrent {
21+
.downloadCurrentButton {
2122
margin-right: 0.5rem;
2223
}
2324

@@ -26,9 +27,16 @@
2627
}
2728

2829
.checkboxGroup {
29-
margin-top: 1rem;
30+
margin: 0.25rem 0;
31+
overflow-y: scroll;
32+
scrollbar-width: thin;
3033

3134
:global(.navds-checkbox__label) {
3235
padding: 0.1875rem;
3336
}
37+
}
38+
39+
.downloadAllButton {
40+
align-self: flex-start;
41+
margin: 0.25rem;
3442
}

src/components/main-section/content-view/html-exporter/HtmlExporter.tsx

+15-14
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const HtmlExporter = ({ content, hidden }: Props) => {
2020

2121
const pdfApi = `${basePath}/pdf`;
2222

23-
const { versionKey, versions } = content;
23+
const { versionKey: currentVersionKey, versions } = content;
2424

2525
return (
2626
<div className={classNames(style.exporter, hidden && style.hidden)}>
@@ -29,28 +29,19 @@ export const HtmlExporter = ({ content, hidden }: Props) => {
2929
{'Eksporter til PDF'}
3030
</Heading>
3131
<Button
32-
variant={'primary'}
32+
variant={'tertiary'}
3333
size={'small'}
3434
as={'a'}
35-
href={`${pdfApi}/single/${versionKey}`}
35+
href={`${pdfApi}/single/${currentVersionKey}`}
3636
icon={<ArrowDownRightIcon className={style.downloadCurrentIcon} />}
3737
iconPosition={'right'}
38-
className={style.downloadCurrent}
38+
className={style.downloadCurrentButton}
3939
>
4040
{'Last ned denne versjonen'}
4141
</Button>
4242
</div>
43-
<Button
44-
variant={'primary'}
45-
size={'small'}
46-
as={'a'}
47-
href={`${pdfApi}/multi/${versionKeysSelected.join(',')}`}
48-
disabled={versionKeysSelected.length === 0}
49-
>
50-
{'Last ned valgte versjoner'}
51-
</Button>
5243
<CheckboxGroup
53-
legend={'Last ned flere versjoner'}
44+
legend={'Velg flere versjoner (lastes ned i en samlet zip-fil)'}
5445
size={'small'}
5546
className={style.checkboxGroup}
5647
onChange={setVersionKeysSelected}
@@ -64,6 +55,16 @@ export const HtmlExporter = ({ content, hidden }: Props) => {
6455
);
6556
})}
6657
</CheckboxGroup>
58+
<Button
59+
variant={'primary'}
60+
size={'medium'}
61+
as={'a'}
62+
href={`${pdfApi}/multi/${versionKeysSelected.join(',')}`}
63+
disabled={versionKeysSelected.length === 0}
64+
className={style.downloadAllButton}
65+
>
66+
{'Last ned valgte versjoner'}
67+
</Button>
6768
</div>
6869
);
6970
};

0 commit comments

Comments
 (0)