Skip to content

Commit

Permalink
Flytter content til samme linje (venstre) som header
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas-CT committed Aug 22, 2023
1 parent a4239c2 commit 04c27a4
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 34 deletions.
17 changes: 3 additions & 14 deletions components/Layout.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import styled from 'styled-components';

const Style = styled.div`
max-width: 50rem;
const Style = styled.main`
max-width: 60rem;
min-height: 100vh;
padding-top: 16px;
margin: 0 auto;
Expand All @@ -10,19 +10,8 @@ const Style = styled.div`
// Overskriver bakgrunnsfarge på secondary button i ds-css
--ac-button-secondary-bg: var(--a-surface-default);
> * {
margin-left: auto;
margin-right: auto;
}
`;

export const Layout = ({ children }) => {
return (
<div className="content">
<Style>
{children}
{/* footer could go here */}
</Style>
</div>
);
return <Style>{children}</Style>;
};
6 changes: 3 additions & 3 deletions components/SoknadHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ export const StyledDetail = styled(Detail)`
`;

export const Style = styled.div`
> * {
& > * {
max-width: 60rem;
margin-left: 16px;
margin-right: 16px;
padding-left: 16px;
padding-right: 16px;
}
align-items: center;
Expand Down
1 change: 1 addition & 0 deletions components/VedleggsListe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ const Style = styled.div`
padding-top: 44px;
margin-bottom: 44px;
outline: none;
max-width: 50rem;
`;

export interface VedleggsListeProps {
Expand Down
32 changes: 15 additions & 17 deletions pages/[innsendingsId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,29 +48,27 @@ const InnsendingsSide: NextPage = () => {
}, [innsendingsId, router, changeLang]);

return (
<div>
<>
<Head>
<title>
{soknad ? soknad.tittel : 'Laster søknad'}
</title>
</Head>
<main>
{soknad && (
<>
<SoknadHeader
soknadoverskrift={soknad.tittel}
skjemanr={soknad.skjemanr}
/>
{soknad && (
<>
<SoknadHeader
soknadoverskrift={soknad.tittel}
skjemanr={soknad.skjemanr}
/>

<VedleggsListe
soknad={soknad}
setSoknad={setSoknad}
erEttersending={erEttersending}
/>
</>
)}
</main>
</div>
<VedleggsListe
soknad={soknad}
setSoknad={setSoknad}
erEttersending={erEttersending}
/>
</>
)}
</>
);
};

Expand Down

0 comments on commit 04c27a4

Please sign in to comment.