I have a toggle and i want to add an icon that act like my toggle
I want to add, a clickable icon inside a textfield.
Textfield.html
<ion-input id="text" [ngModel]="text" rows="1" type="text"></ion-input>
<ion-toggle class="toggle-small" toggle-class="toggle-calm" id="toggle" (ionChange)="add(ioToggle.checked)" #ioToggle ></ion-toggle>
is there a way to add an icon inside the input and will act like the toggle ?
Try this: Your file.html
<ion-input id="text" rows="1" type="text"></ion-input>
</div>
<button id="button" ion-button icon-only clear>
</button>
</div>
file.scss
.Test #button {
vertical-align: top; // change this
display: inline-block;
width: 25px;
margin: 0;
padding: 0;
position: relative;
top: -12px; //change this too
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.