Skip to content

Commit

Permalink
fix(forms): rename contents to content (#3257)
Browse files Browse the repository at this point in the history
This PR should align the term we already use before in other components.

Also, internally used only, we rename `contentsWidth` to `contentWidth`.
  • Loading branch information
tujoworker authored Jan 22, 2024
1 parent d6aaf48 commit 2c9a397
Show file tree
Hide file tree
Showing 37 changed files with 71 additions and 71 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const WithHelp = () => {
label="Label text"
help={{
title: 'Help is available',
contents:
content:
'Here is what a team can do for you. . . . It allows you to help others do their best.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.
| `width` | `string` or `false` | _(optional)_ `false` for no width (use browser default), `small`, `medium` or `large` for predefined standard widths, `stretch` for fill available width. |
| `size` | `string` or `number` | _(optional)_ Size of the input field, see Input's properties for available options. Accepts, but will not forward `number` values as input's element attribute. |
| `align` | `string` | _(optional)_ Lateral alignment of contents of input field, one of `left` (default), `center`, or `right`. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| `autoComplete` | `on` or `string` | _(optional)_ For HTML `autocomplete` [attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete). |
| `step` | `number` | _(optional)_ Determines step granularity when in/decreasing value input through step controls buttons or arrow keys. |
| `showStepControls` | `boolean` | _(optional)_ Show buttons that in/decreases value input by the step value. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export const WithHelp = () => {
label="Label text"
help={{
title: 'Help is available',
contents:
content:
'Somewhere along the way, we must learn that there is nothing greater than to do something for others.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.
| `variant` | `string` | _(optional)_ Choice of UI feature. Can be: `dropdown`, `radio` or `button`. |
| `optionsLayout` | `string` | _(optional)_ Layout for the list of options. Can be `horizontal` or `vertical`. |
| `width` | `string` or `false` | _(optional)_ `small`, `medium` or `large` for predefined standard widths, `stretch` for fill available width. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| `clear` | `boolean` | _(optional)_ True to have a clear-option to remove selected option as value. |
| `children` | `React.Node` | _(optional)_ For providing Option components. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const WithHelp = () => {
value="foo"
help={{
title: 'Help is available',
contents:
content:
'Take the time to help other people without expecting a reward or gratitude is definitely important in living an optimistic life.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down Expand Up @@ -393,7 +393,7 @@ export const MultipleWithHelp = () => {
label="Label text"
help={{
title: 'Help is available',
contents: 'There is more happiness in giving than in receiving.',
content: 'There is more happiness in giving than in receiving.',
}}
multiline
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.
| `maxLength` | `number` | _(optional)_ Validation for maximum length of the text (number of characters). |
| `pattern` | `string` | _(optional)_ Validation based on regex pattern. |
| `width` | `string` or `false` | _(optional)_ `false` for no width (use browser default), `small`, `medium` or `large` for predefined standard widths, `stretch` for fill available width. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |

## Properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,25 @@ export const Widths = () => {

<FieldBlock
label="Small (affects contents only)"
contentsWidth="small"
contentWidth="small"
>
<TestElement>Contents</TestElement>
</FieldBlock>
<FieldBlock
label="Medium (affects contents only)"
contentsWidth="medium"
contentWidth="medium"
>
<TestElement>Contents</TestElement>
</FieldBlock>
<FieldBlock
label="Large (affects contents only)"
contentsWidth="large"
contentWidth="large"
>
<TestElement>Contents</TestElement>
</FieldBlock>
<FieldBlock
label="Stretch (affects contents only)"
contentsWidth="stretch"
contentWidth="stretch"
>
<TestElement>Contents</TestElement>
</FieldBlock>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ showTabs: true
| Property | Type | Description |
| ----------------------------------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------------------------------------------------------------- |
| `width` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. |
| `contentsWidth` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. |
| `contentWidth` | `string` or `false` | _(optional)_ `small`, `medium`, `large`, `stretch` or `false` for predefined standard widths. |
| `size` | `string` or `false` | _(optional)_ define one of the following [heading size](/uilib/elements/heading/): `medium` or `large`. |
| `asFieldset` | `boolean` | _(optional)_ use `true` when you have several form elements. This way a `fieldset` with a `legend` is used. |
| `disabled` | `boolean` | _(optional)_ set `true` to make the inner [FormLabel](/uilib/components/form-label/) behave as disabled. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const WithHelp = () => {
value="20001234567"
help={{
title: 'Help is available',
contents:
content:
'The real point is that we all need help somewhere along life’s path whether we think we will or not. And, if you are the one giving and helping, just remember this: no matter what happens later, you will always be secure in the fact knowing that you have remained strong and true to assist those that need your help.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.

### Component-specific props

| Property | Type | Description |
| --------------------------------------- | --------- | -------------------------------------------------------------------------------- |
| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
| Property | Type | Description |
| --------------------------------------- | --------- | ------------------------------------------------------------------------------- |
| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |

<DataValueReadwriteProperties type="string" />
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const WithHelp = () => {
label="Amount"
help={{
title: 'Help is available',
contents:
content:
'Helping others, without expecting anything in return is what true self-worth is all about.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.

### Component-specific props

| Property | Type | Description |
| --------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| `currency` | `string` | _(optional)_ Currency to show the value in. I.e `NOK` or `USD`. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
| Property | Type | Description |
| --------------------------------------- | -------- | ------------------------------------------------------------------------------- |
| `currency` | `string` | _(optional)_ Currency to show the value in. I.e `NOK` or `USD`. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |

<DataValueReadwriteProperties type="number" />
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const WithHelp = () => {
label="Label text"
help={{
title: 'Help is available',
contents:
content:
'Kindness and helping others will return to you when you least expect it, and maybe when you need it.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.

### Component-specific props

| Property | Type | Description |
| --------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
| Property | Type | Description |
| --------------------------------------- | -------- | ------------------------------------------------------------------------------- |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |

<DataValueReadwriteProperties type="string" />
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export const WithHelp = () => {
value="my-m@il.com"
help={{
title: 'Help is available',
contents:
content:
'Use your gifts to teach and help others. Acknowledge them as gifts (even if only in your mind). Take some time to list your strengths as well as the ways in which you could share them with the world around you and how that truly is a gift to others.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.

### Component-specific props

| Property | Type | Description |
| --------------------------------------- | -------- | -------------------------------------------------------------------------------- |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
| Property | Type | Description |
| --------------------------------------- | -------- | ------------------------------------------------------------------------------- |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |

<DataValueReadwriteProperties type="string" />
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const WithHelp = () => {
label="Label text"
help={{
title: 'Help is available',
contents:
content:
'Kindness and helping others will return to you when you least expect it, and maybe when you need it.',
}}
onChange={(expiry) => console.log('onChange', expiry)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const WithHelp = () => {
value="01017501234"
help={{
title: 'Help is available',
contents:
content:
'The more I help others to succeed, the more I succeed.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import DataValueReadwriteProperties from '../../data-value-readwrite-properties.

### Component-specific props

| Property | Type | Description |
| --------------------------------------- | --------- | -------------------------------------------------------------------------------- |
| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `contents`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |
| Property | Type | Description |
| --------------------------------------- | --------- | ------------------------------------------------------------------------------- |
| `validate` | `boolean` | _(optional)_ Using this prop you can disable the default validation. |
| `help` | `object` | _(optional)_ Provide a help button. Object consisting of `title` and `content`. |
| [Space](/uilib/layout/space/properties) | Various | _(optional)_ Spacing properties like `top` or `bottom` are supported. |

<DataValueReadwriteProperties type="string" />
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const WithHelp = () => {
value="987654321"
help={{
title: 'Help is available',
contents:
content:
'Success has nothing to do with what you gain in life or accomplish for yourself. It’s what you do for others.',
}}
onChange={(value) => console.log('onChange', value)}
Expand Down
Loading

0 comments on commit 2c9a397

Please sign in to comment.