mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
33 lines
681 B
TypeScript
33 lines
681 B
TypeScript
import { ElementRef, Renderer } from '@angular/core';
|
|
|
|
import { Config } from '../../config/config';
|
|
import { Ion } from '../ion';
|
|
import { ToolbarTitle } from './toolbar-title';
|
|
|
|
/**
|
|
* @hidden
|
|
*/
|
|
export class ToolbarBase extends Ion {
|
|
private _title: ToolbarTitle;
|
|
|
|
constructor(config: Config, elementRef: ElementRef, renderer: Renderer) {
|
|
super(config, elementRef, renderer, 'toolbar');
|
|
}
|
|
|
|
/**
|
|
* @hidden
|
|
*/
|
|
_setTitle(titleCmp: ToolbarTitle) {
|
|
this._title = titleCmp;
|
|
}
|
|
|
|
/**
|
|
* @hidden
|
|
* Returns the toolbar title text if it exists or an empty string
|
|
*/
|
|
getTitleText() {
|
|
return (this._title && this._title.getTitleText()) || '';
|
|
}
|
|
|
|
}
|