Skip to content

Commit

Permalink
docs(component-overview): legger til eksempel på required på phonenumber
Browse files Browse the repository at this point in the history
  • Loading branch information
tuva-odegard committed Jun 18, 2024
1 parent eeb4f83 commit ad998fc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { PhoneNumber } from '@sb1/ffe-form-react';

<PhoneNumber
number=""
countryCode=""
countryCodeAndNumberFieldMessage="Både landkode og telefonnummer feltene er påkrevd"
/>
numberInputProps={{ value: '' }}
countryInputProps={{ value: '' }}
countryCodeAndNumberErrorMessage="Både landkode og telefonnummer feltene er påkrevd"
/>;
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { PhoneNumber } from '@sb1/ffe-form-react';

<PhoneNumber number="" countryCode="47" numberFieldMessage="Dette feltet er påkrevd" />
<PhoneNumber
numberInputProps={{ value: '123123123', required: true }}
countryCodeInputProps={{ required: true }}
/>;
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { PhoneNumber } from '@sb1/ffe-form-react';

<PhoneNumber number="" countryCode="47" numberFieldMessage="Dette feltet er påkrevd" />
<PhoneNumber
numberInputProps={{ value: '' }}
countryCodeInputProps={{ value: '47' }}
numberErrorMessage="Dette feltet er påkrevd"
/>;
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import { PhoneNumber } from '@sb1/ffe-form-react';

<PhoneNumber number="123123123" countryCode="" countryCodeFieldMessage="Dette feltet er påkrevd" />
<PhoneNumber
numberInputProps={{ value: '123123123' }}
countryCodeInputProps={{ value: '' }}
countryCodeErrorMessage="Dette feltet er påkrevd"
/>;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { PhoneNumber } from '@sb1/ffe-form-react';

<PhoneNumber isMobileNumber={true} number="123123123" />
<PhoneNumber isMobileNumber={true} numberInputProps={{ value: '123123123' }} />;
2 changes: 1 addition & 1 deletion component-overview/examples/form/PhoneNumber.jsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import { PhoneNumber } from '@sb1/ffe-form-react';

<PhoneNumber number="123123123" />
<PhoneNumber numberInputProps={{ value: '123123123' }} />;

0 comments on commit ad998fc

Please sign in to comment.