Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fjerner less styling fra Container og SystemetLaster #945

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/frontend/index.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
@import "./komponenter/app.less";
@import "./komponenter/Fagsak/Personlinje/Behandlingsmeny/behandlingsmeny.less";

// Felles
@import "./komponenter/Felleskomponenter/Hendelsesoversikt/Totrinnskontroll/totrinnskontroll.less";
@import "./komponenter/Felleskomponenter/SystemetLaster/systemet-laster.less";
@import "./komponenter/Felleskomponenter/PersonInformasjon/personinformasjon.less";
19 changes: 16 additions & 3 deletions src/frontend/komponenter/Container.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import classNames from 'classnames';
import { BrowserRouter as Router, Navigate, Route, Routes } from 'react-router-dom';
import styled from 'styled-components';

import BarnehagebarnTabComp from './Barnehagebarn/BarnehagebarnTabComp';
import FagsakContainer from './Fagsak/FagsakContainer';
Expand All @@ -19,6 +19,19 @@ import { FagsakProvider } from '../context/fagsak/FagsakContext';
import { Oppgaver } from '../context/OppgaverContext';
import { TidslinjeProvider } from '../context/TidslinjeContext';

const Main = styled.main<{ $systemetLaster: boolean }>`
position: fixed;
width: 100%;
height: 100%;
${props => {
if (props.$systemetLaster)
return `
filter: blur(12px);
-webkit-filter: blur(12px);
`;
}};
`;

const Container: React.FC = () => {
const { autentisert, systemetLaster, innloggetSaksbehandler, appInfoModal, erTogglesHentet } =
useApp();
Expand All @@ -32,7 +45,7 @@ const Container: React.FC = () => {
{systemetLaster() && <SystemetLaster />}
<Toasts />

<main className={classNames('container', systemetLaster() && 'blur')}>
<Main $systemetLaster={systemetLaster()}>
<HeaderMedSøk
brukerNavn={innloggetSaksbehandler?.displayName}
brukerEnhet={innloggetSaksbehandler?.enhet}
Expand Down Expand Up @@ -69,7 +82,7 @@ const Container: React.FC = () => {
</Routes>
</BehandlingProvider>
</FagsakProvider>
</main>
</Main>
</>
)
) : (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
import * as React from 'react';

import { Heading, Loader } from '@navikt/ds-react';
import styled from 'styled-components';

import { Heading, Loader, VStack } from '@navikt/ds-react';
import { AZIndexTooltip } from '@navikt/ds-tokens/dist/tokens';

const PosisjonertVStack = styled(VStack)`
position: fixed;
width: 100vw;
height: 100vh;
display: flex;
align-items: center;
top: 20%;
z-index: ${AZIndexTooltip};
`;

const SystemetLaster = () => {
return (
<div className={'systemet-laster'}>
<div className={'systemet-laster__content'}>
<Heading
size={'medium'}
className={'systemet-laster__content--tekst'}
children={'Systemet laster'}
/>
<Loader size="large" transparent={true} title="Systemet laster data" />
</div>
</div>
<PosisjonertVStack gap="2">
<Heading size={'medium'} children={'Systemet laster'} />
<Loader size="large" transparent={true} title="Systemet laster data" />
</PosisjonertVStack>
);
};

Expand Down

This file was deleted.

27 changes: 0 additions & 27 deletions src/frontend/komponenter/app.less

This file was deleted.