Skip to content

Commit

Permalink
Fjern bruk av classnames - trengs to steder og vi kan enkelt bruke st…
Browse files Browse the repository at this point in the history
…ring-klassenavn
  • Loading branch information
charliemidtlyng committed Jan 3, 2025
1 parent 2ac2182 commit eae992a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 17 deletions.
6 changes: 0 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"@types/react-dom": "^19.0.2",
"@amplitude/analytics-browser": "2.11.9",
"axios": "^1.7.9",
"classnames": "^2.5.1",
"constate": "^3.3.2",
"date-fns": "^4.1.0",
"form-data": "^4.0.1",
Expand Down
8 changes: 3 additions & 5 deletions src/components/panel/CheckboxPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { PropsWithChildren } from 'react';
import { Checkbox } from '@navikt/ds-react';
import classnames from 'classnames';
import styled from 'styled-components';
import {
ABlue100,
Expand Down Expand Up @@ -64,10 +63,9 @@ const CheckboxPanelCustom: React.FC<Properties> = ({
value={value}
name={name}
onChange={onChange}
className={classnames('checkbox-panel', {
active: checked,
'non-active': !checked,
})}
className={
checked ? 'checkbox-panel active' : 'checkbox-panel non-active'
}
>
{children}
</StyledCheckbox>
Expand Down
6 changes: 1 addition & 5 deletions src/components/panel/RadioPanel.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React, { PropsWithChildren } from 'react';
import { Radio } from '@navikt/ds-react';
import classnames from 'classnames';
import styled from 'styled-components';
import {
ABlue100,
Expand Down Expand Up @@ -65,10 +64,7 @@ const RadioPanelCustom: React.FC<Properties> = ({
name={name}
checked={checked}
onChange={onChange}
className={classnames('radio-panel', {
active: checked,
'non-active': !checked,
})}
className={checked ? 'radio-panel active' : 'radio-panel non-active'}
>
{children}
</StyledRadio>
Expand Down

0 comments on commit eae992a

Please sign in to comment.