Skip to content

Commit

Permalink
TC-140 Legg til kopiknapp på fnr (#710)
Browse files Browse the repository at this point in the history
* TC-140 Legg til kopiknapp på fnr

* package-lock.json i usynk

* Ta i bruk DS CopyToClipboard

* Ta i bruk DS CopyToClipboard. Blå knapp
  • Loading branch information
klaramargrethehelgemo authored Aug 23, 2022
1 parent 45d03a0 commit 421a94b
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
3 changes: 3 additions & 0 deletions src/components/tabell/brukerfnr.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from 'react';
import {BrukerModell} from '../../model-interfaces';
import {BodyShort} from '@navikt/ds-react';
import { CopyToClipboard } from "@navikt/ds-react-internal";

interface BrukerFnrProps {
className?: string;
Expand All @@ -11,6 +12,8 @@ function BrukerFnr({className, bruker}: BrukerFnrProps) {
return (
<BodyShort size="small" className={className}>
{bruker.fnr}
{bruker.fnr &&
<CopyToClipboard copyText={bruker.fnr} popoverText="Kopiert" size="xsmall" />}
</BodyShort>
);
}
Expand Down
8 changes: 8 additions & 0 deletions src/enhetsportefolje/brukerliste.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,14 @@
font-style: italic;
border: none;
}
.veilarbportefoljeflatefs .fnr-kolonne {
display: flex;
align-items: center;
}
.veilarbportefoljeflatefs .fnr-kolonne svg {
height: 1rem;
width: 1rem;
}
.veilarbportefoljeflatefs .valgt-sortering {
font-weight: bold;
}
Expand Down
2 changes: 1 addition & 1 deletion src/enhetsportefolje/enhet-kolonner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function EnhetKolonner({className, bruker, enhetId, filtervalg, valgteKolonner,
return (
<div className={className}>
<BrukerNavn className="col col-xs-2" bruker={bruker} enhetId={enhetId} />
<BrukerFnr className="col col-xs-2" bruker={bruker} />
<BrukerFnr className="col col-xs-2 fnr-kolonne" bruker={bruker} />
<TekstKolonne
className="col col-xs-2"
tekst={bruker.foedeland ? capitalize(bruker.foedeland) : '-'}
Expand Down
12 changes: 6 additions & 6 deletions src/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,12 @@ body .invisible {
visibility: hidden;
}
body .text-hide {
font: 0px/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
position: absolute;
font: 0px/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
position: absolute;
}
body .ustilet {
margin: 0;
Expand Down

0 comments on commit 421a94b

Please sign in to comment.