diff --git a/src/components/toolbar/back-button.js b/src/components/toolbar/back-button.js new file mode 100644 index 0000000000..24ee9817c5 --- /dev/null +++ b/src/components/toolbar/back-button.js @@ -0,0 +1,27 @@ +import {NgElement, Component, Template} from 'angular2/angular2' +import {ComponentConfig} from 'ionic2/config/component-config' + +export let BackButtonConfig = new ComponentConfig('back-button') + +@Component({ + selector: '.back-button', + services: [BackButtonConfig] +}) +@Template({ + inline: ` + +
+
Back
+
+
` +}) +export class BackButton { + constructor(@NgElement() ngEle:NgElement, configFactory: BackButtonConfig) { + this.domElement = ngEle.domElement + this.config = configFactory.create(this); + + + } + +} + diff --git a/src/components/toolbar/extensions/android.scss b/src/components/toolbar/extensions/android.scss index d14aed61c0..3e7156fb26 100644 --- a/src/components/toolbar/extensions/android.scss +++ b/src/components/toolbar/extensions/android.scss @@ -5,8 +5,8 @@ $toolbar-android-height: 6.4rem !default; $toolbar-android-background: #f7f7f8 !default; -$toolbar-android-title-font-size: 1.7rem !default; -$toolbar-android-button-font-size: 1.7rem !default; +$toolbar-android-title-font-size: 2rem !default; +$toolbar-android-button-font-size: 2rem !default; $toolbar-android-button-text-color: #007aff !default; @@ -14,6 +14,10 @@ $toolbar-android-button-text-color: #007aff !default; height: $toolbar-android-height; background: $toolbar-android-background; + .bar-inner-title { + font-size: $toolbar-android-title-font-size; + } + .button { font-size: $toolbar-android-button-font-size; color: $toolbar-android-button-text-color; diff --git a/src/components/toolbar/extensions/ios.scss b/src/components/toolbar/extensions/ios.scss index a5d3b502ce..d69fd6ba12 100644 --- a/src/components/toolbar/extensions/ios.scss +++ b/src/components/toolbar/extensions/ios.scss @@ -8,7 +8,7 @@ $toolbar-ios-border-color: #c4c4c4 !default; $toolbar-ios-title-font-size: 1.7rem !default; $toolbar-ios-button-font-size: 1.7rem !default; -$toolbar-ios-button-text-color: #007aff !default; +$toolbar-ios-button-text-color: #007aff !default; $toolbar-ios-button-background-color: transparent !default; @@ -64,9 +64,4 @@ $toolbar-ios-button-background-color: transparent !default; background: $toolbar-ios-button-background-color; } - .back-button-icon { - margin-right: 5px; - min-width: 12px; - } - } diff --git a/src/components/toolbar/toolbar.js b/src/components/toolbar/toolbar.js index ea7993fbf0..dc3dbbe7b1 100644 --- a/src/components/toolbar/toolbar.js +++ b/src/components/toolbar/toolbar.js @@ -1,4 +1,5 @@ import {NgElement, Component, Template} from 'angular2/angular2' +import {BackButton} from 'ionic2/components/toolbar/back-button' import {ComponentConfig} from 'ionic2/config/component-config' export let ToolbarConfig = new ComponentConfig('toolbar') @@ -13,13 +14,7 @@ export let ToolbarConfig = new ComponentConfig('toolbar') @Template({ inline: `
- +
{{ title }} @@ -33,7 +28,8 @@ export let ToolbarConfig = new ComponentConfig('toolbar')
-
` +
`, + directives: [BackButton] }) export class Toolbar { constructor(@NgElement() ngEle:NgElement, configFactory: ToolbarConfig) { diff --git a/src/components/toolbar/toolbar.scss b/src/components/toolbar/toolbar.scss index 2fa244e2b7..e22119b777 100644 --- a/src/components/toolbar/toolbar.scss +++ b/src/components/toolbar/toolbar.scss @@ -54,9 +54,11 @@ $toolbar-background: #f7f7f8 !default; .back-button { @include flex-display(); +} - .back-button-icon { - } +.back-button-icon { + margin-right: 5px; + min-width: 12px; } .toolbar .button {