mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-21 04:53:58 +08:00
feat(checkbox): stand-alone checkbox components
This commit is contained in:
@ -22,6 +22,12 @@ $checkbox-ios-media-margin: $item-ios-padding-media-top $item-ios-
|
|||||||
$checkbox-ios-disabled-opacity: 0.4 !default;
|
$checkbox-ios-disabled-opacity: 0.4 !default;
|
||||||
|
|
||||||
|
|
||||||
|
ion-checkbox {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// iOS Checkbox Outer Circle: Unchecked
|
// iOS Checkbox Outer Circle: Unchecked
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
@ -78,6 +84,7 @@ $checkbox-ios-disabled-opacity: 0.4 !default;
|
|||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
.item ion-checkbox {
|
.item ion-checkbox {
|
||||||
|
position: static;
|
||||||
display: block;
|
display: block;
|
||||||
margin: $checkbox-ios-media-margin;
|
margin: $checkbox-ios-media-margin;
|
||||||
}
|
}
|
||||||
|
@ -26,6 +26,12 @@ $checkbox-md-icon-border-color-off: darken($list-md-border-color, 40%) !def
|
|||||||
$checkbox-md-icon-border-color-on: map-get($colors-md, primary) !default;
|
$checkbox-md-icon-border-color-on: map-get($colors-md, primary) !default;
|
||||||
|
|
||||||
|
|
||||||
|
ion-checkbox {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Material Design Checkbox Outer Square: Unchecked
|
// Material Design Checkbox Outer Square: Unchecked
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
@ -82,6 +88,8 @@ $checkbox-md-icon-border-color-on: map-get($colors-md, primary) !default;
|
|||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
.item ion-checkbox {
|
.item ion-checkbox {
|
||||||
|
position: static;
|
||||||
|
display: block;
|
||||||
margin: $checkbox-md-media-margin;
|
margin: $checkbox-md-media-margin;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ class E2EApp {
|
|||||||
|
|
||||||
this.grapeDisabled = true;
|
this.grapeDisabled = true;
|
||||||
this.grapeChecked = true;
|
this.grapeChecked = true;
|
||||||
|
this.standAloneChecked = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleGrapeChecked() {
|
toggleGrapeChecked() {
|
||||||
|
@ -48,6 +48,11 @@
|
|||||||
<button (click)="doSubmit($event)" outline small class="e2eSubmit">Submit</button>
|
<button (click)="doSubmit($event)" outline small class="e2eSubmit">Submit</button>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<ion-checkbox [(ngModel)]="standAloneChecked"></ion-checkbox>
|
||||||
|
Stand-alone checkbox: {{standAloneChecked}}
|
||||||
|
</p>
|
||||||
|
|
||||||
<p aria-hidden="true" padding>
|
<p aria-hidden="true" padding>
|
||||||
<code>appleCtrl.dirty: {{fruitsForm.controls.appleCtrl.dirty}}</code><br>
|
<code>appleCtrl.dirty: {{fruitsForm.controls.appleCtrl.dirty}}</code><br>
|
||||||
<code>appleCtrl.value: {{fruitsForm.controls.appleCtrl.value}}</code><br>
|
<code>appleCtrl.value: {{fruitsForm.controls.appleCtrl.value}}</code><br>
|
||||||
|
@ -67,7 +67,6 @@ export class InputBase {
|
|||||||
|
|
||||||
self._scrollMove = function(ev: UIEvent) {
|
self._scrollMove = function(ev: UIEvent) {
|
||||||
// scroll move event listener this instance can reuse
|
// scroll move event listener this instance can reuse
|
||||||
console.log('scrollmove', ev)
|
|
||||||
if (!(self._nav && self._nav.isTransitioning())) {
|
if (!(self._nav && self._nav.isTransitioning())) {
|
||||||
self.deregScrollMove();
|
self.deregScrollMove();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user