mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(build): rename ionic directory to src and update all references in the build process.
This commit is contained in:
1
src/components/button/test/basic/e2e.ts
Normal file
1
src/components/button/test/basic/e2e.ts
Normal file
@@ -0,0 +1 @@
|
||||
|
||||
21
src/components/button/test/basic/index.ts
Normal file
21
src/components/button/test/basic/index.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import {App, IonicApp} from '../../../../../ionic';
|
||||
|
||||
|
||||
@App({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
class E2EApp {
|
||||
constructor(app: IonicApp) {
|
||||
app.setTitle('Basic Buttons');
|
||||
|
||||
this.testingColors = ['primary', 'secondary', 'danger', 'dark'];
|
||||
this.testingColorIndex = 0;
|
||||
this.chgColor();
|
||||
}
|
||||
|
||||
chgColor() {
|
||||
this.btnColor = this.testingColors[this.testingColorIndex];
|
||||
console.log('dynamic btnColor', this.btnColor);
|
||||
this.testingColorIndex = (this.testingColorIndex >= this.testingColors.length - 1 ? 0 : this.testingColorIndex + 1);
|
||||
}
|
||||
}
|
||||
47
src/components/button/test/basic/main.html
Normal file
47
src/components/button/test/basic/main.html
Normal file
@@ -0,0 +1,47 @@
|
||||
|
||||
<ion-toolbar>
|
||||
<ion-title>Default Buttons</ion-title>
|
||||
</ion-toolbar>
|
||||
|
||||
<ion-content padding style="text-align:center">
|
||||
|
||||
<p>
|
||||
<button><span>Default</span></button>
|
||||
<button class="activated">Default.activated</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button primary>Primary</button>
|
||||
<button primary class="activated">Primary.activated</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button secondary>Secondary</button>
|
||||
<button secondary class="activated">Secondary.activated</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button danger>Danger</button>
|
||||
<button danger class="activated">Danger.activated</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button light>Light</button>
|
||||
<button light class="activated">Light.activated</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button dark>Dark</button>
|
||||
<button dark class="activated">Dark.activated</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button disabled>Disabled</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button [color]="btnColor" (click)="chgColor()">Change Color</button>
|
||||
<button outline [color]="btnColor" (click)="chgColor()">Change Color</button>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user