mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(button): strong decorator
This commit is contained in:
committed by
Adam Bradley
parent
4219eae1f7
commit
fa0579fe46
32
src/components/button/test/decorator/app-module.ts
Normal file
32
src/components/button/test/decorator/app-module.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import { Component, NgModule } from '@angular/core';
|
||||
import { IonicApp, IonicModule } from '../../../..';
|
||||
|
||||
|
||||
@Component({
|
||||
templateUrl: 'main.html'
|
||||
})
|
||||
export class E2EPage {
|
||||
strong = false;
|
||||
}
|
||||
|
||||
@Component({
|
||||
template: '<ion-nav [root]="rootPage"></ion-nav>'
|
||||
})
|
||||
export class E2EApp {
|
||||
rootPage = E2EPage;
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
E2EApp,
|
||||
E2EPage
|
||||
],
|
||||
imports: [
|
||||
IonicModule.forRoot(E2EApp)
|
||||
],
|
||||
bootstrap: [IonicApp],
|
||||
entryComponents: [
|
||||
E2EPage
|
||||
]
|
||||
})
|
||||
export class AppModule {}
|
||||
4
src/components/button/test/decorator/e2e.ts
Normal file
4
src/components/button/test/decorator/e2e.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
|
||||
it('should click edit button', function() {
|
||||
element(by.css('.e2eButtonEdit')).click();
|
||||
});
|
||||
57
src/components/button/test/decorator/main.html
Normal file
57
src/components/button/test/decorator/main.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<ion-header>
|
||||
|
||||
<ion-toolbar>
|
||||
<ion-title>Outline Buttons</ion-title>
|
||||
<ion-buttons end>
|
||||
<button ion-button [strong]="strong" (click)="strong = !strong" class="e2eButtonEdit">
|
||||
{{strong ? 'Done' : 'Edit' }}
|
||||
</button>
|
||||
</ion-buttons>
|
||||
</ion-toolbar>
|
||||
|
||||
</ion-header>
|
||||
|
||||
|
||||
<ion-content padding style="text-align:center" class="outer-content">
|
||||
|
||||
<p>
|
||||
<button ion-button [strong]="strong" small>Default (small)</button>
|
||||
<button ion-button strong small>Default (small)</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button outline [strong]="strong" color="secondary">Outline</button>
|
||||
<button ion-button outline strong color="secondary">Outline</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button block [strong]="strong" color="danger" large>Block (large)</button>
|
||||
<button ion-button block strong color="danger" large>Block (large)</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button full [strong]="strong" color="dark">Full</button>
|
||||
<button ion-button full strong color="dark">Default</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button raised [strong]="strong" color="light">Raised</button>
|
||||
<button ion-button raised strong color="light">Raised</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button round [strong]="strong">Round</button>
|
||||
<button ion-button round strong>Round</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button clear [strong]="strong">Clear</button>
|
||||
<button ion-button clear strong>Clear</button>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<button ion-button clear [strong]="strong">Default</button>
|
||||
<button ion-button clear strong>Default</button>
|
||||
</p>
|
||||
|
||||
</ion-content>
|
||||
Reference in New Issue
Block a user