Skip to content

Commit

Permalink
Merge branch 'bugfix/PEK-902-tillate-punktum' into coffeebox
Browse files Browse the repository at this point in the history
  • Loading branch information
martinstorvoll committed Dec 19, 2024
2 parents 7e97b3a + ffcdce0 commit 67b8147
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ exports[`RedigerAvansertBeregning > Gitt at en bruker har vedtak om alderspensjo
</div>
</div>
<hr
class="_divider_1adfb3 _divider__NoMargin_1adfb3"
class="_divider_1adfb3 _divider__noMargin_1adfb3"
/>
<div>
<div
Expand Down
4 changes: 2 additions & 2 deletions src/components/common/Divider/Divider.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
border-bottom: 1px solid var(--a-border-divider);
margin: var(--a-spacing-8) 0;

&__SmallMargin {
&__smallMargin {
margin: var(--a-spacing-4) 0;
}

&__NoMargin {
&__noMargin {
margin: 0;
}
}
12 changes: 6 additions & 6 deletions src/components/common/Divider/Divider.module.scss.d.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import globalClassNames from "../../../style.d";
import globalClassNames from '../../../style.d'
declare const classNames: typeof globalClassNames & {
readonly divider: "divider";
readonly divider__SmallMargin: "divider__SmallMargin";
readonly divider__NoMargin: "divider__NoMargin";
};
export = classNames;
readonly divider: 'divider'
readonly divider__smallMargin: 'divider__smallMargin'
readonly divider__noMargin: 'divider__noMargin'
}
export = classNames
4 changes: 2 additions & 2 deletions src/components/common/Divider/Divider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ export const Divider: React.FC<Props> = ({ smallMargin, noMargin }) => {
return (
<hr
className={clsx(styles.divider, {
[styles.divider__SmallMargin]: smallMargin,
[styles.divider__NoMargin]: noMargin,
[styles.divider__smallMargin]: smallMargin,
[styles.divider__noMargin]: noMargin,
})}
/>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`Divider > rendrer riktig med default verdier 1`] = `
exports[`Divider > rendrer riktig uten margin 1`] = `
<DocumentFragment>
<hr
class="_divider_1adfb3 _divider__NoMargin_1adfb3"
class="_divider_1adfb3 _divider__noMargin_1adfb3"
/>
</DocumentFragment>
`;
8 changes: 3 additions & 5 deletions src/utils/__tests__/inntekt.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -322,13 +322,11 @@ describe('inntekt-utils', () => {
).toBeFalsy()
expect(
validateInntekt('-25', updateValidationErrorMessageMock)
).toBeTruthy()
expect(
validateInntekt('-', updateValidationErrorMessageMock)
).toBeTruthy()
).toBeFalsy()
expect(validateInntekt('-', updateValidationErrorMessageMock)).toBeFalsy()
expect(
validateInntekt('123.43', updateValidationErrorMessageMock)
).toBeTruthy()
).toBeFalsy()
expect(updateValidationErrorMessageMock).toHaveBeenNthCalledWith(
1,
'inntekt.endre_inntekt_modal.textfield.validation_error.type'
Expand Down
2 changes: 1 addition & 1 deletion src/utils/inntekt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const validateInntekt = (
return isValid
}

if (!/^[0-9\s\-.]+$/.test(input)) {
if (!/^[0-9\s]+$/.test(input)) {
isValid = false
if (updateValidationErrorMessage) {
updateValidationErrorMessage(
Expand Down

0 comments on commit 67b8147

Please sign in to comment.