From 08300e25081693127e6b0d0da4d0f7b371b165d5 Mon Sep 17 00:00:00 2001 From: Shawn Taylor Date: Thu, 9 Nov 2023 10:51:01 -0500 Subject: [PATCH 1/4] docs(radio): playground for compareWith (#3237) --- docs/api/radio.md | 8 +++ docs/api/select.md | 2 +- .../angular/example_component_html.md | 9 +++ .../angular/example_component_ts.md | 39 +++++++++++ .../v7/radio/using-comparewith/demo.html | 67 +++++++++++++++++++ .../usage/v7/radio/using-comparewith/index.md | 25 +++++++ .../v7/radio/using-comparewith/javascript.md | 48 +++++++++++++ .../usage/v7/radio/using-comparewith/react.md | 52 ++++++++++++++ .../usage/v7/radio/using-comparewith/vue.md | 54 +++++++++++++++ .../using-comparewith/javascript.md | 1 - 10 files changed, 303 insertions(+), 2 deletions(-) create mode 100644 static/usage/v7/radio/using-comparewith/angular/example_component_html.md create mode 100644 static/usage/v7/radio/using-comparewith/angular/example_component_ts.md create mode 100644 static/usage/v7/radio/using-comparewith/demo.html create mode 100644 static/usage/v7/radio/using-comparewith/index.md create mode 100644 static/usage/v7/radio/using-comparewith/javascript.md create mode 100644 static/usage/v7/radio/using-comparewith/react.md create mode 100644 static/usage/v7/radio/using-comparewith/vue.md diff --git a/docs/api/radio.md b/docs/api/radio.md index 9473c5cc790..ca519103739 100644 --- a/docs/api/radio.md +++ b/docs/api/radio.md @@ -36,6 +36,14 @@ import LabelPlacement from '@site/static/usage/v7/radio/label-placement/index.md +## Object Value References + +By default, the radio group uses strict equality (`===`) to determine if an option is selected. This can be overridden by providing a property name or a function to the `compareWith` property. + +import UsingComparewith from '@site/static/usage/v7/radio/using-comparewith/index.md'; + + + ## Alignment Developers can use the `alignment` property to control how the label and control are aligned on the cross axis. This property mirrors the flexbox `align-items` property. diff --git a/docs/api/select.md b/docs/api/select.md index 8dc81783b05..b462d92a696 100644 --- a/docs/api/select.md +++ b/docs/api/select.md @@ -119,7 +119,7 @@ import RespondingToInteractionExample from '@site/static/usage/v7/select/basic/r When using objects for select values, it is possible for the identities of these objects to change if they are coming from a server or database, while the selected value's identity remains the same. For example, this can occur when an existing record with the desired object value is loaded into the select, but the newly retrieved select options now have different identities. This will result in the select appearing to have no value at all, even though the original selection in still intact. -By default, the select uses object equality (`===`) to determine if an option is selected. This can be overridden by providing a property name or a function to the `compareWith` property. +By default, the select uses strict equality (`===`) to determine if an option is selected. This can be overridden by providing a property name or a function to the `compareWith` property. ### Using compareWith diff --git a/static/usage/v7/radio/using-comparewith/angular/example_component_html.md b/static/usage/v7/radio/using-comparewith/angular/example_component_html.md new file mode 100644 index 00000000000..1e5e93819fa --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/angular/example_component_html.md @@ -0,0 +1,9 @@ +```html + + + + {{ food.name }} + + + +``` diff --git a/static/usage/v7/radio/using-comparewith/angular/example_component_ts.md b/static/usage/v7/radio/using-comparewith/angular/example_component_ts.md new file mode 100644 index 00000000000..d7f803aea0b --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/angular/example_component_ts.md @@ -0,0 +1,39 @@ +```ts +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-example', + templateUrl: 'example.component.html', +}) +export class ExampleComponent { + foods = [ + { + id: 1, + name: 'Apples', + type: 'fruit', + }, + { + id: 2, + name: 'Carrots', + type: 'vegetable', + }, + { + id: 3, + name: 'Cupcakes', + type: 'dessert', + }, + ]; + + compareWith(o1, o2) { + return o1.id === o2.id; + } + + handleChange(ev) { + console.log('Current value:', JSON.stringify(ev.target.value)); + } + + trackItems(index: number, item: any) { + return item.id; + } +} +``` diff --git a/static/usage/v7/radio/using-comparewith/demo.html b/static/usage/v7/radio/using-comparewith/demo.html new file mode 100644 index 00000000000..4903e4b04d4 --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/demo.html @@ -0,0 +1,67 @@ + + + + + + Radio + + + + + + + + + +
+ + + +
+
+
+ + + + diff --git a/static/usage/v7/radio/using-comparewith/index.md b/static/usage/v7/radio/using-comparewith/index.md new file mode 100644 index 00000000000..6db5886795d --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/index.md @@ -0,0 +1,25 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript from './javascript.md'; +import react from './react.md'; +import vue from './vue.md'; + +import angular_example_component_html from './angular/example_component_html.md'; +import angular_example_component_ts from './angular/example_component_ts.md'; + + diff --git a/static/usage/v7/radio/using-comparewith/javascript.md b/static/usage/v7/radio/using-comparewith/javascript.md new file mode 100644 index 00000000000..8dd2130b3e8 --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/javascript.md @@ -0,0 +1,48 @@ +```html + + + + + +``` diff --git a/static/usage/v7/radio/using-comparewith/react.md b/static/usage/v7/radio/using-comparewith/react.md new file mode 100644 index 00000000000..dff3b4233a6 --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/react.md @@ -0,0 +1,52 @@ +```tsx +import React from 'react'; +import { IonItem, IonList, IonRadio, IonRadioGroup } from '@ionic/react'; + +interface Food { + id: number; + name: string; + type: string; +} + +const foods: Food[] = [ + { + id: 1, + name: 'Apples', + type: 'fruit', + }, + { + id: 2, + name: 'Carrots', + type: 'vegetable', + }, + { + id: 3, + name: 'Cupcakes', + type: 'dessert', + }, +]; + +const compareWith = (o1: Food, o2: Food) => { + return o1.id === o2.id; +}; + +function Example() { + return ( + + console.log('Current value:', JSON.stringify(ev.detail.value))} + > + {foods.map((food) => ( + + + {food.name} + + + ))} + + + ); +} +export default Example; +``` diff --git a/static/usage/v7/radio/using-comparewith/vue.md b/static/usage/v7/radio/using-comparewith/vue.md new file mode 100644 index 00000000000..28518284654 --- /dev/null +++ b/static/usage/v7/radio/using-comparewith/vue.md @@ -0,0 +1,54 @@ +```html + + + +``` diff --git a/static/usage/v7/select/objects-as-values/using-comparewith/javascript.md b/static/usage/v7/select/objects-as-values/using-comparewith/javascript.md index 4c4a831c91f..51504820ca1 100644 --- a/static/usage/v7/select/objects-as-values/using-comparewith/javascript.md +++ b/static/usage/v7/select/objects-as-values/using-comparewith/javascript.md @@ -38,7 +38,6 @@ selectEl.appendChild(selectOption); }); - const valueLabel = document.querySelector('ion-text'); selectEl.addEventListener('ionChange', () => { console.log('Current value:', JSON.stringify(selectEl.value)); }); From 2c869177d1c757b5a9f4a94c6039e9d6b94fb387 Mon Sep 17 00:00:00 2001 From: Liam DeBeasi Date: Mon, 27 Nov 2023 12:07:57 -0500 Subject: [PATCH 2/4] docs(toast): add swipeGesture playground (#3247) --- docs/api/toast.md | 8 +++++ .../usage/v7/toast/swipe-gesture/angular.md | 17 +++++++++ static/usage/v7/toast/swipe-gesture/demo.html | 35 +++++++++++++++++++ static/usage/v7/toast/swipe-gesture/index.md | 19 ++++++++++ .../v7/toast/swipe-gesture/javascript.md | 17 +++++++++ static/usage/v7/toast/swipe-gesture/react.md | 27 ++++++++++++++ static/usage/v7/toast/swipe-gesture/vue.md | 23 ++++++++++++ 7 files changed, 146 insertions(+) create mode 100644 static/usage/v7/toast/swipe-gesture/angular.md create mode 100644 static/usage/v7/toast/swipe-gesture/demo.html create mode 100644 static/usage/v7/toast/swipe-gesture/index.md create mode 100644 static/usage/v7/toast/swipe-gesture/javascript.md create mode 100644 static/usage/v7/toast/swipe-gesture/react.md create mode 100644 static/usage/v7/toast/swipe-gesture/vue.md diff --git a/docs/api/toast.md b/docs/api/toast.md index 3ecf502a043..6e49ee25bdc 100644 --- a/docs/api/toast.md +++ b/docs/api/toast.md @@ -72,6 +72,14 @@ import PositionAnchor from '@site/static/usage/v7/toast/position-anchor/index.md +## Swipe to Dismiss + +Toasts can be swiped to dismiss by using the `swipeGesture` property. This feature is position-aware, meaning the direction that users need to swipe will change based on the value of the `position` property. Additionally, the distance users need to swipe may be impacted by the `positionAnchor` property. + +import SwipeGesture from '@site/static/usage/v7/toast/swipe-gesture/index.md'; + + + ## Layout Button containers within the toast can be displayed either on the same line as the message or stacked on separate lines using the `layout` property. The stacked layout should be used with buttons that have long text values. Additionally, buttons in a stacked toast layout can use a `side` value of either `start` or `end`, but not both. diff --git a/static/usage/v7/toast/swipe-gesture/angular.md b/static/usage/v7/toast/swipe-gesture/angular.md new file mode 100644 index 00000000000..146007d0391 --- /dev/null +++ b/static/usage/v7/toast/swipe-gesture/angular.md @@ -0,0 +1,17 @@ +```html + + Open Toast + + + + + Footer + + +``` diff --git a/static/usage/v7/toast/swipe-gesture/demo.html b/static/usage/v7/toast/swipe-gesture/demo.html new file mode 100644 index 00000000000..f3080326619 --- /dev/null +++ b/static/usage/v7/toast/swipe-gesture/demo.html @@ -0,0 +1,35 @@ + + + + + + Toast + + + + + + + + + +
+ Open Toast + +
+
+ + + + Footer + + +
+ + diff --git a/static/usage/v7/toast/swipe-gesture/index.md b/static/usage/v7/toast/swipe-gesture/index.md new file mode 100644 index 00000000000..59e7afcab70 --- /dev/null +++ b/static/usage/v7/toast/swipe-gesture/index.md @@ -0,0 +1,19 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript from './javascript.md'; +import react from './react.md'; +import vue from './vue.md'; +import angular from './angular.md'; + + diff --git a/static/usage/v7/toast/swipe-gesture/javascript.md b/static/usage/v7/toast/swipe-gesture/javascript.md new file mode 100644 index 00000000000..2b7f79e79d4 --- /dev/null +++ b/static/usage/v7/toast/swipe-gesture/javascript.md @@ -0,0 +1,17 @@ +```html + + Open Toast + + + + + Footer + + +``` diff --git a/static/usage/v7/toast/swipe-gesture/react.md b/static/usage/v7/toast/swipe-gesture/react.md new file mode 100644 index 00000000000..09bbd89e3fd --- /dev/null +++ b/static/usage/v7/toast/swipe-gesture/react.md @@ -0,0 +1,27 @@ +```tsx +import React from 'react'; +import { IonButton, IonContent, IonFooter, IonTitle, IonToast, IonToolbar } from '@ionic/react'; + +function Example() { + return ( + <> + + Open Toast + + + + + Footer + + + + ); +} +export default Example; +``` diff --git a/static/usage/v7/toast/swipe-gesture/vue.md b/static/usage/v7/toast/swipe-gesture/vue.md new file mode 100644 index 00000000000..8aaf3583a98 --- /dev/null +++ b/static/usage/v7/toast/swipe-gesture/vue.md @@ -0,0 +1,23 @@ +```html + + + +``` From ea8c1e2b33dcc369b3d8c1343358bb592552624f Mon Sep 17 00:00:00 2001 From: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:54:17 -0600 Subject: [PATCH 3/4] feat(input, textarea, select): add section for start and end slots (#3271) --- docs/api/input.md | 16 +++++++ docs/api/select.md | 14 ++++++ docs/api/textarea.md | 16 +++++++ .../usage/v7/input/start-end-slots/angular.md | 12 +++++ .../usage/v7/input/start-end-slots/demo.html | 31 +++++++++++++ .../usage/v7/input/start-end-slots/index.md | 17 +++++++ .../v7/input/start-end-slots/javascript.md | 12 +++++ .../usage/v7/input/start-end-slots/react.md | 21 +++++++++ static/usage/v7/input/start-end-slots/vue.md | 33 ++++++++++++++ .../v7/select/start-end-slots/angular.md | 15 +++++++ .../usage/v7/select/start-end-slots/demo.html | 45 +++++++++++++++++++ .../usage/v7/select/start-end-slots/index.md | 18 ++++++++ .../v7/select/start-end-slots/javascript.md | 15 +++++++ .../usage/v7/select/start-end-slots/react.md | 24 ++++++++++ static/usage/v7/select/start-end-slots/vue.md | 37 +++++++++++++++ .../v7/textarea/start-end-slots/angular.md | 12 +++++ .../v7/textarea/start-end-slots/demo.html | 31 +++++++++++++ .../v7/textarea/start-end-slots/index.md | 17 +++++++ .../v7/textarea/start-end-slots/javascript.md | 12 +++++ .../v7/textarea/start-end-slots/react.md | 21 +++++++++ .../usage/v7/textarea/start-end-slots/vue.md | 33 ++++++++++++++ 21 files changed, 452 insertions(+) create mode 100644 static/usage/v7/input/start-end-slots/angular.md create mode 100644 static/usage/v7/input/start-end-slots/demo.html create mode 100644 static/usage/v7/input/start-end-slots/index.md create mode 100644 static/usage/v7/input/start-end-slots/javascript.md create mode 100644 static/usage/v7/input/start-end-slots/react.md create mode 100644 static/usage/v7/input/start-end-slots/vue.md create mode 100644 static/usage/v7/select/start-end-slots/angular.md create mode 100644 static/usage/v7/select/start-end-slots/demo.html create mode 100644 static/usage/v7/select/start-end-slots/index.md create mode 100644 static/usage/v7/select/start-end-slots/javascript.md create mode 100644 static/usage/v7/select/start-end-slots/react.md create mode 100644 static/usage/v7/select/start-end-slots/vue.md create mode 100644 static/usage/v7/textarea/start-end-slots/angular.md create mode 100644 static/usage/v7/textarea/start-end-slots/demo.html create mode 100644 static/usage/v7/textarea/start-end-slots/index.md create mode 100644 static/usage/v7/textarea/start-end-slots/javascript.md create mode 100644 static/usage/v7/textarea/start-end-slots/react.md create mode 100644 static/usage/v7/textarea/start-end-slots/vue.md diff --git a/docs/api/input.md b/docs/api/input.md index afbf24ced47..b185d516a78 100644 --- a/docs/api/input.md +++ b/docs/api/input.md @@ -148,6 +148,22 @@ Please submit bug reports with Maskito to the [Maskito Github repository](https: ::: +## Start and End Slots (experimental) + +The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the input. + +Note that this feature is considered experimental because it relies on a simulated version of [Web Component slots](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots). As a result, the simulated behavior may not exactly match the native slot behavior. + +:::note +In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information. + +If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to. +::: + +import StartEndSlots from '@site/static/usage/v7/input/start-end-slots/index.md'; + + + ## Theming ### Colors diff --git a/docs/api/select.md b/docs/api/select.md index b462d92a696..a08d54bfe3c 100644 --- a/docs/api/select.md +++ b/docs/api/select.md @@ -173,6 +173,20 @@ import InterfaceOptionsExample from '@site/static/usage/v7/select/customization/ +## Start and End Slots + +The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the select. If the slot content is clicked, the select will not open. + +:::note +In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information. + +If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to. +::: + +import StartEndSlots from '@site/static/usage/v7/select/start-end-slots/index.md'; + + + ## Customization There are two units that make up the Select component and each need to be styled separately. The `ion-select` element is represented on the view by the selected value(s), or placeholder if there is none, and dropdown icon. The interface, which is defined in the [Interfaces](#interfaces) section above, is the dialog that opens when clicking on the `ion-select`. The interface contains all of the options defined by adding `ion-select-option` elements. The following sections will go over the differences between styling these. diff --git a/docs/api/textarea.md b/docs/api/textarea.md index 25c3328f4d0..2fc4fb610ac 100644 --- a/docs/api/textarea.md +++ b/docs/api/textarea.md @@ -109,6 +109,22 @@ import ClearOnEditPlayground from '@site/static/usage/v7/textarea/clear-on-edit/ +## Start and End Slots (experimental) + +The `start` and `end` slots can be used to place icons, buttons, or prefix/suffix text on either side of the textarea. + +Note that this feature is considered experimental because it relies on a simulated version of [Web Component slots](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_templates_and_slots). As a result, the simulated behavior may not exactly match the native slot behavior. + +:::note +In most cases, [Icon](./icon.md) components placed in these slots should have `aria-hidden="true"`. See the [Icon accessibility docs](https://ionicframework.com/docs/api/icon#accessibility) for more information. + +If slot content is meant to be interacted with, it should be wrapped in an interactive element such as a [Button](./button.md). This ensures that the content can be tabbed to. +::: + +import StartEndSlots from '@site/static/usage/v7/textarea/start-end-slots/index.md'; + + + ## Migrating from Legacy Textarea Syntax A simpler textarea syntax was introduced in Ionic 7.0. This new syntax reduces the boilerplate required to setup an textarea, resolves accessibility issues, and improves the developer experience. diff --git a/static/usage/v7/input/start-end-slots/angular.md b/static/usage/v7/input/start-end-slots/angular.md new file mode 100644 index 00000000000..b33306d4727 --- /dev/null +++ b/static/usage/v7/input/start-end-slots/angular.md @@ -0,0 +1,12 @@ +```html + + + + + + + + + + +``` diff --git a/static/usage/v7/input/start-end-slots/demo.html b/static/usage/v7/input/start-end-slots/demo.html new file mode 100644 index 00000000000..086f0c8a8b4 --- /dev/null +++ b/static/usage/v7/input/start-end-slots/demo.html @@ -0,0 +1,31 @@ + + + + + + Input + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + diff --git a/static/usage/v7/input/start-end-slots/index.md b/static/usage/v7/input/start-end-slots/index.md new file mode 100644 index 00000000000..1104bcfdc9d --- /dev/null +++ b/static/usage/v7/input/start-end-slots/index.md @@ -0,0 +1,17 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript from './javascript.md'; +import react from './react.md'; +import vue from './vue.md'; +import angular from './angular.md'; + + diff --git a/static/usage/v7/input/start-end-slots/javascript.md b/static/usage/v7/input/start-end-slots/javascript.md new file mode 100644 index 00000000000..ed192bb8c41 --- /dev/null +++ b/static/usage/v7/input/start-end-slots/javascript.md @@ -0,0 +1,12 @@ +```html + + + + + + + + + + +``` diff --git a/static/usage/v7/input/start-end-slots/react.md b/static/usage/v7/input/start-end-slots/react.md new file mode 100644 index 00000000000..b638d8c8f07 --- /dev/null +++ b/static/usage/v7/input/start-end-slots/react.md @@ -0,0 +1,21 @@ +```tsx +import React from 'react'; +import { IonButton, IonIcon, IonInput, IonItem, IonList } from '@ionic/react'; +import { eye, lockClosed } from 'ionicons/icons'; + +function Example() { + return ( + + + + + + + + + + + ); +} +export default Example; +``` diff --git a/static/usage/v7/input/start-end-slots/vue.md b/static/usage/v7/input/start-end-slots/vue.md new file mode 100644 index 00000000000..76380eb566a --- /dev/null +++ b/static/usage/v7/input/start-end-slots/vue.md @@ -0,0 +1,33 @@ +```html + + + +``` diff --git a/static/usage/v7/select/start-end-slots/angular.md b/static/usage/v7/select/start-end-slots/angular.md new file mode 100644 index 00000000000..e42b896605c --- /dev/null +++ b/static/usage/v7/select/start-end-slots/angular.md @@ -0,0 +1,15 @@ +```html + + + + + Apple + Banana + Orange + + + + + + +``` diff --git a/static/usage/v7/select/start-end-slots/demo.html b/static/usage/v7/select/start-end-slots/demo.html new file mode 100644 index 00000000000..fa04ee84bfb --- /dev/null +++ b/static/usage/v7/select/start-end-slots/demo.html @@ -0,0 +1,45 @@ + + + + + + Select + + + + + + + + + + + +
+ + + + + Apple + Banana + Orange + + + + + + +
+
+
+ + diff --git a/static/usage/v7/select/start-end-slots/index.md b/static/usage/v7/select/start-end-slots/index.md new file mode 100644 index 00000000000..7dea970c230 --- /dev/null +++ b/static/usage/v7/select/start-end-slots/index.md @@ -0,0 +1,18 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript from './javascript.md'; +import react from './react.md'; +import vue from './vue.md'; +import angular from './angular.md'; + + diff --git a/static/usage/v7/select/start-end-slots/javascript.md b/static/usage/v7/select/start-end-slots/javascript.md new file mode 100644 index 00000000000..78d136d6a6a --- /dev/null +++ b/static/usage/v7/select/start-end-slots/javascript.md @@ -0,0 +1,15 @@ +```html + + + + + Apple + Banana + Orange + + + + + + +``` diff --git a/static/usage/v7/select/start-end-slots/react.md b/static/usage/v7/select/start-end-slots/react.md new file mode 100644 index 00000000000..98bbf6208d7 --- /dev/null +++ b/static/usage/v7/select/start-end-slots/react.md @@ -0,0 +1,24 @@ +```tsx +import React from 'react'; +import { IonButton, IonIcon, IonItem, IonList, IonSelect, IonSelectOption } from '@ionic/react'; +import { eye, leaf } from 'ionicons/icons'; + +function Example() { + return ( + + + + + Apple + Banana + Orange + + + + + + + ); +} +export default Example; +``` diff --git a/static/usage/v7/select/start-end-slots/vue.md b/static/usage/v7/select/start-end-slots/vue.md new file mode 100644 index 00000000000..37882998e57 --- /dev/null +++ b/static/usage/v7/select/start-end-slots/vue.md @@ -0,0 +1,37 @@ +```html + + + +``` diff --git a/static/usage/v7/textarea/start-end-slots/angular.md b/static/usage/v7/textarea/start-end-slots/angular.md new file mode 100644 index 00000000000..ce0988fefec --- /dev/null +++ b/static/usage/v7/textarea/start-end-slots/angular.md @@ -0,0 +1,12 @@ +```html + + + + + + + + + + +``` diff --git a/static/usage/v7/textarea/start-end-slots/demo.html b/static/usage/v7/textarea/start-end-slots/demo.html new file mode 100644 index 00000000000..cab3d77636d --- /dev/null +++ b/static/usage/v7/textarea/start-end-slots/demo.html @@ -0,0 +1,31 @@ + + + + + + Textarea + + + + + + + + + +
+ + + + + + + + + + +
+
+
+ + diff --git a/static/usage/v7/textarea/start-end-slots/index.md b/static/usage/v7/textarea/start-end-slots/index.md new file mode 100644 index 00000000000..d84b6df8c0f --- /dev/null +++ b/static/usage/v7/textarea/start-end-slots/index.md @@ -0,0 +1,17 @@ +import Playground from '@site/src/components/global/Playground'; + +import javascript from './javascript.md'; +import react from './react.md'; +import vue from './vue.md'; +import angular from './angular.md'; + + diff --git a/static/usage/v7/textarea/start-end-slots/javascript.md b/static/usage/v7/textarea/start-end-slots/javascript.md new file mode 100644 index 00000000000..a666863d413 --- /dev/null +++ b/static/usage/v7/textarea/start-end-slots/javascript.md @@ -0,0 +1,12 @@ +```html + + + + + + + + + + +``` diff --git a/static/usage/v7/textarea/start-end-slots/react.md b/static/usage/v7/textarea/start-end-slots/react.md new file mode 100644 index 00000000000..469f6bd8f84 --- /dev/null +++ b/static/usage/v7/textarea/start-end-slots/react.md @@ -0,0 +1,21 @@ +```tsx +import React from 'react'; +import { IonButton, IonIcon, IonItem, IonList, IonTextarea } from '@ionic/react'; +import { eye, lockClosed } from 'ionicons/icons'; + +function Example() { + return ( + + + + + + + + + + + ); +} +export default Example; +``` diff --git a/static/usage/v7/textarea/start-end-slots/vue.md b/static/usage/v7/textarea/start-end-slots/vue.md new file mode 100644 index 00000000000..629240c1456 --- /dev/null +++ b/static/usage/v7/textarea/start-end-slots/vue.md @@ -0,0 +1,33 @@ +```html + + + +``` From 34540d75622bc7c2985091d0f70f624a8bdfb3c8 Mon Sep 17 00:00:00 2001 From: Amanda Johnston <90629384+amandaejohnston@users.noreply.github.com> Date: Wed, 6 Dec 2023 09:24:42 -0600 Subject: [PATCH 4/4] chore(select): remove unneeded patch from start/end slots demo (#3295) --- static/usage/v7/select/start-end-slots/demo.html | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/static/usage/v7/select/start-end-slots/demo.html b/static/usage/v7/select/start-end-slots/demo.html index fa04ee84bfb..a8a6b13bd9d 100644 --- a/static/usage/v7/select/start-end-slots/demo.html +++ b/static/usage/v7/select/start-end-slots/demo.html @@ -8,17 +8,6 @@ - -