-
Notifications
You must be signed in to change notification settings - Fork 1
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 #608 from navikt/bytt-veilederverktoykomponent
Bruk designsystem-komponent til Veilederverktøy
- Loading branch information
Showing
14 changed files
with
262 additions
and
512 deletions.
There are no files selected for viewing
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 was deleted.
Oops, something went wrong.
This file was deleted.
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
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 |
---|---|---|
@@ -1,28 +1,24 @@ | ||
import { Dropdown } from '@navikt/ds-react'; | ||
import withClickMetric, { ClickMetricProps } from '../../components/click-metric/click-metric'; | ||
import { MenyKnapp } from '../../components/meny-knapp/meny-knapp'; | ||
import { useAppStore } from '../../../store/app-store'; | ||
|
||
interface StartProsessProps { | ||
knappeTekst: string; | ||
onClick?: () => void; | ||
} | ||
|
||
const ProcessKnapp = withClickMetric(MenyKnapp); | ||
const DropdownMenuListItem = withClickMetric(Dropdown.Menu.List.Item); | ||
|
||
function StartProcess({ knappeTekst, onClick, metricName }: StartProsessProps & ClickMetricProps) { | ||
export const StartProsess = ({ knappeTekst, onClick, metricName }: StartProsessProps & ClickMetricProps) => { | ||
const { setAvsluttOppfolgingOpptelt } = useAppStore(); | ||
|
||
if (metricName === 'avslutt_oppfolging') { | ||
setAvsluttOppfolgingOpptelt(false); | ||
} | ||
|
||
return ( | ||
<li> | ||
<ProcessKnapp onClick={onClick} metricName={metricName}> | ||
{knappeTekst} | ||
</ProcessKnapp> | ||
</li> | ||
<DropdownMenuListItem as="button" variant="tertiary-neutral" onClick={onClick} metricName={metricName}> | ||
{knappeTekst} | ||
</DropdownMenuListItem> | ||
); | ||
} | ||
|
||
export default StartProcess; | ||
}; |
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 was deleted.
Oops, something went wrong.
109 changes: 0 additions & 109 deletions
109
src/component/veilederverktoy/veilederverktoy-dropdown/veilederverktoy-dropdown.less
This file was deleted.
Oops, something went wrong.
69 changes: 0 additions & 69 deletions
69
src/component/veilederverktoy/veilederverktoy-dropdown/veilederverktoy-dropdown.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.