Skip to content

Commit e8ae85b

Browse files
authored
docs(Fields): add info about Form.Appearance in size property (#4609)
1 parent 8bd84e4 commit e8ae85b

File tree

9 files changed

+25
-8
lines changed

9 files changed

+25
-8
lines changed

packages/dnb-eufemia/src/extensions/forms/Field/ArraySelection/ArraySelectionDocs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const arraySelectionProperties: PropertiesTableProps = {
1919
status: 'optional',
2020
},
2121
size: {
22-
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute.',
22+
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute. Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).',
2323
type: 'string',
2424
status: 'optional',
2525
},

packages/dnb-eufemia/src/extensions/forms/Field/Date/DateDocs.ts

+5
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const {
2323
labelSrOnly,
2424
suffix,
2525
stretch,
26+
size,
2627
'[Space](/uilib/layout/space/properties)': space,
2728
...datePickerProperties
2829
} = DatePickerProperties
@@ -49,6 +50,10 @@ export const DateProperties: PropertiesTableProps = {
4950
...showResetButton,
5051
doc: 'If set to `true`, a reset button will be shown. You can change the default text by using `resetButtonText="Tilbakestill"` Defaults to `true`.',
5152
},
53+
size: {
54+
...size,
55+
doc: `${size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,
56+
},
5257
...datePickerProperties,
5358
}
5459
// Filter out the events that are handled by `useFieldProps`

packages/dnb-eufemia/src/extensions/forms/Field/Expiry/ExpiryDocs.tsx

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ import { PropertiesTableProps } from '../../../../shared/types'
22
import { inputProperties } from '../../../../components/input/InputDocs'
33

44
export const ExpiryProperties: PropertiesTableProps = {
5-
size: inputProperties.size,
5+
size: {
6+
...inputProperties.size,
7+
doc: `${inputProperties.size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,
8+
},
69
}

packages/dnb-eufemia/src/extensions/forms/Field/Number/NumberDocs.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ export const numberProperties: PropertiesTableProps = {
5757
type: ['string', 'false'],
5858
status: 'optional',
5959
},
60-
size: inputProperties.size,
60+
size: {
61+
...inputProperties.size,
62+
doc: `${inputProperties.size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,
63+
},
6164
align: {
6265
doc: 'Lateral alignment of contents of input field, one of `left` (default), `center`, or `right`.',
6366
type: 'string',

packages/dnb-eufemia/src/extensions/forms/Field/Password/PasswordDocs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const PasswordProperties: PropertiesTableProps = {
77
status: 'optional',
88
},
99
size: {
10-
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute.',
10+
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute. Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).',
1111
type: ['string', 'number'],
1212
status: 'optional',
1313
},

packages/dnb-eufemia/src/extensions/forms/Field/SelectCountry/SelectCountryDocs.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export const SelectCountryProperties: PropertiesTableProps = {
1313
type: 'function',
1414
status: 'optional',
1515
},
16-
size: autocompleteProperties.size,
16+
size: {
17+
...autocompleteProperties.size,
18+
doc: `${autocompleteProperties.size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,
19+
},
1720
}
1821

1922
export const SelectCountryGeneralEvents = getFieldEventsWithTypes(

packages/dnb-eufemia/src/extensions/forms/Field/Selection/SelectionDocs.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const SelectionProperties: PropertiesTableProps = {
4747
status: 'optional',
4848
},
4949
size: {
50-
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute.',
50+
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute. Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).',
5151
type: 'string',
5252
status: 'optional',
5353
},

packages/dnb-eufemia/src/extensions/forms/Field/String/StringDocs.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,10 @@ export const stringProperties: PropertiesTableProps = {
5959
},
6060

6161
// - Input props
62-
size: inputProperties.size,
62+
size: {
63+
...inputProperties.size,
64+
doc: `${inputProperties.size.doc} Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).`,
65+
},
6366
align: inputProperties.align,
6467
selectall: inputProperties.selectall,
6568
clear: inputProperties.clear,

packages/dnb-eufemia/src/extensions/forms/Field/Toggle/ToggleDocs.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const ToggleProperties: PropertiesTableProps = {
2222
status: 'optional',
2323
},
2424
size: {
25-
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute.',
25+
doc: 'The sizes you can choose is small (1.5rem), default (2rem), medium (2.5rem) and large (3rem) are supported component sizes. Defaults to default / null. Also, if you define a number like size="2" then it will be forwarded as the input element attribute. Consider rather setting field sizes with [Form.Appearance](/uilib/extensions/forms/Form/Appearance/).',
2626
type: 'string',
2727
status: 'optional',
2828
},

0 commit comments

Comments
 (0)