-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(range): fix styling on range, add demo
references #5422
- Loading branch information
1 parent
f239b72
commit d24b080
Showing
6 changed files
with
85 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {App} from 'ionic-angular'; | ||
|
||
@App({ | ||
templateUrl: 'main.html' | ||
}) | ||
class ApiDemoApp { | ||
brightness: number = 20; | ||
saturation: number = 0; | ||
warmth: number = 1300; | ||
structure: any = {lower: 33, upper: 60}; | ||
|
||
onChange(ev) { | ||
console.log("Changed", ev); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<ion-toolbar> | ||
<ion-title>Range</ion-title> | ||
</ion-toolbar> | ||
|
||
<ion-content class="outer-content"> | ||
<ion-list> | ||
<ion-list-header> | ||
Brightness | ||
<ion-badge item-right>{{brightness}}</ion-badge> | ||
</ion-list-header> | ||
<ion-item> | ||
<ion-icon item-left small name="sunny"></ion-icon> | ||
<ion-range [(ngModel)]="brightness"></ion-range> | ||
<ion-icon item-right name="sunny"></ion-icon> | ||
</ion-item> | ||
</ion-list> | ||
|
||
<ion-list> | ||
<ion-list-header> | ||
Saturation | ||
<ion-badge item-right secondary>{{saturation}}</ion-badge> | ||
</ion-list-header> | ||
<ion-item> | ||
<ion-note item-left>-200</ion-note> | ||
<ion-range min="-200" max="200" pin="true" [(ngModel)]="saturation" secondary></ion-range> | ||
<ion-note item-right>200</ion-note> | ||
</ion-item> | ||
</ion-list> | ||
|
||
<ion-list> | ||
<ion-list-header> | ||
Warmth | ||
<ion-badge item-right danger>{{warmth}}</ion-badge> | ||
</ion-list-header> | ||
<ion-item> | ||
<ion-icon item-left small danger name="thermometer"></ion-icon> | ||
<ion-range min="1000" max="2000" step="100" snaps="true" [(ngModel)]="warmth" danger></ion-range> | ||
<ion-icon item-right danger name="thermometer"></ion-icon> | ||
</ion-item> | ||
</ion-list> | ||
|
||
<ion-list> | ||
<ion-list-header> | ||
Structure | ||
<ion-badge item-right dark>{{structure.lower}}</ion-badge> | ||
<ion-badge item-right dark>{{structure.upper}}</ion-badge> | ||
</ion-list-header> | ||
<ion-item> | ||
<ion-note item-left>0</ion-note> | ||
<ion-range dualKnobs="true" pin="true" [(ngModel)]="structure" (ionChange)="onChange($event)" dark></ion-range> | ||
<ion-note item-right>100</ion-note> | ||
</ion-item> | ||
</ion-list> | ||
</ion-content> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,6 @@ ion-range { | |
position: relative; | ||
display: block; | ||
|
||
margin-top: -16px; | ||
padding: $range-md-padding; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,6 @@ ion-range { | |
position: relative; | ||
display: block; | ||
|
||
margin-top: -16px; | ||
padding: $range-wp-padding; | ||
} | ||
|
||
|