var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); import { ChangeDetectionStrategy, Component, ElementRef, Renderer } from '@angular/core'; import { Config } from '../../config/config'; import { ToolbarBase } from './toolbar-base'; /** * @name Toolbar * @description * A Toolbar is a generic bar that is positioned above or below content. * Unlike a [Navbar](../Navbar/), a toolbar can be used as a subheader. * When toolbars are placed within an `` or ``, * the toolbars stay fixed in their respective location. When placed within * ``, toolbars will scroll with the content. * * * ### Buttons in a Toolbar * Buttons placed in a toolbar should be placed inside of the `` * element. An exception to this is a [menuToggle](../../menu/MenuToggle) button. * It should not be placed inside of the `` element. Both the * `` element and the `menuToggle` can be positioned inside of the * toolbar using different properties. The below chart has a description of each * property. * * | Property | Description | * |-------------|-----------------------------------------------------------------------------------------------------------------------| * | `start` | Positions element to the left of the content in `ios` mode, and directly to the right in `md` and `wp` mode. | * | `end` | Positions element to the right of the content in `ios` mode, and to the far right in `md` and `wp` mode. | * | `left` | Positions element to the left of all other elements. | * | `right` | Positions element to the right of all other elements. | * * * ### Header / Footer Box Shadow and Border * In `md` mode, the `` will receive a box-shadow on the bottom, and the * `` will receive a box-shadow on the top. In `ios` mode, the `` * will receive a border on the bottom, and the `` will receive a border on the * top. Both the `md` box-shadow and the `ios` border can be removed by adding the `no-border` * attribute to the element. * * ```html * * * Header * * * * * * * * * Footer * * * ``` * * @usage * * ```html * * * * * My Toolbar Title * * * * I'm a subheader * * * * * * * * * Scrolls with the content * * * * * * * * * I'm a footer * * * * ``` * * @demo /docs/demos/src/toolbar/ * @see {@link ../Navbar/ Navbar API Docs} */ var Toolbar = (function (_super) { __extends(Toolbar, _super); function Toolbar(config, elementRef, renderer) { var _this = _super.call(this, config, elementRef, renderer) || this; _this._sbPadding = config.getBoolean('statusbarPadding'); return _this; } Toolbar.decorators = [ { type: Component, args: [{ selector: 'ion-toolbar', template: '
' + '' + '' + '' + '
' + '' + '
', host: { 'class': 'toolbar', '[class.statusbar-padding]': '_sbPadding' }, changeDetection: ChangeDetectionStrategy.OnPush, },] }, ]; /** @nocollapse */ Toolbar.ctorParameters = function () { return [ { type: Config, }, { type: ElementRef, }, { type: Renderer, }, ]; }; return Toolbar; }(ToolbarBase)); export { Toolbar }; //# sourceMappingURL=toolbar.js.map