Skip to content

docs(input, textarea): update migration guide for proper metadata usage #2827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 60 additions & 36 deletions static/usage/v7/input/migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,21 @@ import TabItem from '@theme/TabItem';
</ion-item>

<!-- After -->
<ion-item>
<ion-input
label="Email:"
counter="true"
maxlength="100"
helper-text="Enter an email"
error-text="Please enter a valid email"
></ion-input>
</ion-item>

<!--
Metadata such as counters and helper text should not
be used when an input is in an item/list. If you need to
provide more context on a input, consider using an ion-note
underneath the ion-list.
-->

<ion-input
label="Email:"
counter="true"
maxlength="100"
helper-text="Enter an email"
error-text="Please enter a valid email"
></ion-input>
```
</TabItem>
<TabItem value="angular">
Expand Down Expand Up @@ -105,15 +111,21 @@ import TabItem from '@theme/TabItem';
</ion-item>

<!-- After -->
<ion-item>
<ion-input
label="Email:"
[counter]="true"
maxlength="100"
helperText="Enter an email"
errorText="Please enter a valid email"
></ion-input>
</ion-item>

<!--
Metadata such as counters and helper text should not
be used when an input is in an item/list. If you need to
provide more context on a input, consider using an ion-note
underneath the ion-list.
-->

<ion-input
label="Email:"
[counter]="true"
maxlength="100"
helperText="Enter an email"
errorText="Please enter a valid email"
></ion-input>
```
</TabItem>
<TabItem value="react">
Expand Down Expand Up @@ -157,15 +169,21 @@ import TabItem from '@theme/TabItem';
</IonItem>

{/* After */}
<IonItem>
<IonInput
label="Email:"
counter={true}
maxlength="100"
helperText="Enter an email"
errorText="Please enter a valid email"
></IonInput>
</IonItem>

{/*
Metadata such as counters and helper text should not
be used when an input is in an item/list. If you need to
provide more context on a input, consider using an IonNote
underneath the IonList.
*/}

<IonInput
label="Email:"
counter={true}
maxlength="100"
helperText="Enter an email"
errorText="Please enter a valid email"
></IonInput>
```
</TabItem>
<TabItem value="vue">
Expand Down Expand Up @@ -209,15 +227,21 @@ import TabItem from '@theme/TabItem';
</ion-item>

<!-- After -->
<ion-item>
<ion-input
label="Email:"
:counter="true"
maxlength="100"
helper-text="Enter an email"
error-text="Please enter a valid email"
></ion-input>
</ion-item>

<!--
Metadata such as counters and helper text should not
be used when an input is in an item/list. If you need to
provide more context on a input, consider using an ion-note
underneath the ion-list.
-->

<ion-input
label="Email:"
:counter="true"
maxlength="100"
helper-text="Enter an email"
error-text="Please enter a valid email"
></ion-input>
```
</TabItem>
</Tabs>
Expand Down
96 changes: 60 additions & 36 deletions static/usage/v7/textarea/migration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,21 @@ import TabItem from '@theme/TabItem';
</ion-item>

<!-- After -->
<ion-item>
<ion-textarea
label="Label:"
counter="true"
maxlength="100"
helper-text="Enter text"
error-text="Please enter text"
></ion-textarea>
</ion-item>

<!--
Metadata such as counters and helper text should not
be used when a textarea is in an item/list. If you need to
provide more context on a textarea, consider using an ion-note
underneath the ion-list.
-->

<ion-textarea
label="Label:"
counter="true"
maxlength="100"
helper-text="Enter text"
error-text="Please enter text"
></ion-textarea>
```
</TabItem>
<TabItem value="angular">
Expand Down Expand Up @@ -105,15 +111,21 @@ import TabItem from '@theme/TabItem';
</ion-item>

<!-- After -->
<ion-item>
<ion-textarea
label="Label:"
[counter]="true"
maxlength="100"
helperText="Enter text"
errorText="Please enter text"
></ion-textarea>
</ion-item>

<!--
Metadata such as counters and helper text should not
be used when a textarea is in an item/list. If you need to
provide more context on a textarea, consider using an ion-note
underneath the ion-list.
-->

<ion-textarea
label="Label:"
[counter]="true"
maxlength="100"
helperText="Enter text"
errorText="Please enter text"
></ion-textarea>
```
</TabItem>
<TabItem value="react">
Expand Down Expand Up @@ -157,15 +169,21 @@ import TabItem from '@theme/TabItem';
</IonItem>

{/* After */}
<IonItem>
<IonTextarea
label="Label:"
counter={true}
maxlength="100"
helperText="Enter text"
errorText="Please enter text"
></IonTextarea>
</IonItem>

{/*
Metadata such as counters and helper text should not
be used when a textarea is in an item/list. If you need to
provide more context on a textarea, consider using an IonNote
underneath the IonList.
*/}

<IonTextarea
label="Label:"
counter={true}
maxlength="100"
helperText="Enter text"
errorText="Please enter text"
></IonTextarea>
```
</TabItem>
<TabItem value="vue">
Expand Down Expand Up @@ -209,15 +227,21 @@ import TabItem from '@theme/TabItem';
</ion-item>

<!-- After -->
<ion-item>
<ion-textarea
label="Label:"
:counter="true"
maxlength="100"
helper-text="Enter text"
error-text="Please enter text"
></ion-textarea>
</ion-item>

<!--
Metadata such as counters and helper text should not
be used when a textarea is in an item/list. If you need to
provide more context on a textarea, consider using an ion-note
underneath the ion-list.
-->

<ion-textarea
label="Label:"
:counter="true"
maxlength="100"
helper-text="Enter text"
error-text="Please enter text"
></ion-textarea>
```
</TabItem>
</Tabs>
Expand Down