This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #912 from navikt/css-container-fix
Fiks "Del skjerm med veileder"
- Loading branch information
Showing
12 changed files
with
91 additions
and
118 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/komponenter/footer/common/del-skjerm-lenke/DelSkjermLenke.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import LenkeMedIkon from '../lenke-med-ikon/LenkeMedIkon'; | ||
import Tekst from 'tekster/finn-tekst'; | ||
import DelSkjerm from 'ikoner/del-skjerm/DelSkjerm'; | ||
import React, { useState } from 'react'; | ||
import DelSkjermModal from '../del-skjerm-modal/DelSkjermModal'; | ||
import { AnalyticsCategory, analyticsEvent } from 'utils/analytics'; | ||
import { Normaltekst } from 'nav-frontend-typografi'; | ||
|
||
export const DelSkjermLenke = () => { | ||
const [isOpen, setIsOpen] = useState(false); | ||
|
||
const openModal = () => { | ||
analyticsEvent({ | ||
category: AnalyticsCategory.Footer, | ||
action: `kontakt/del-skjerm-open`, | ||
}); | ||
setIsOpen(true); | ||
}; | ||
|
||
const closeModal = () => { | ||
analyticsEvent({ | ||
category: AnalyticsCategory.Footer, | ||
action: `kontakt/del-skjerm-close`, | ||
}); | ||
setIsOpen(false); | ||
}; | ||
|
||
return ( | ||
<> | ||
<li> | ||
<Normaltekst> | ||
<LenkeMedIkon | ||
onClick={openModal} | ||
tekst={<Tekst id="footer-del-skjerm" />} | ||
ikon={<DelSkjerm style={{ height: '24px', width: '24px' }} />} | ||
/> | ||
</Normaltekst> | ||
</li> | ||
{isOpen && <DelSkjermModal isOpen={isOpen} onClose={closeModal} />} | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.