import { Component, ContentChild, ContentChildren } from '@angular/core'; import { Platform } from '../../platform/platform'; import { UIEventManager } from '../../gestures/ui-event-manager'; import { FabButton } from './fab'; import { FabList } from './fab-list'; /** * @name FabContainer * @module ionic * * @description * `` is not a FAB button by itself but a container that assist the fab button (` * * * * * * * * ``` * * Ionic's FAB also supports "material design's fab speed dial". It is a normal fab button * that shows a list of related actions when clicked. * * The same `ion-fab` container can contain several `ion-fab-list` with different side values: * `top`, `bottom`, `left` and `right`. For example, if you want to have a list of button that are * on the top of the main button, you should use `side="top"` and so on. By default, if side is ommited, `side="bottom"`. * * ```html * * * * * * * * * * * * * * * ``` * * A FAB speed dial can also be closed programatically. * * ```html * * * * * * * * * * ``` * * ```ts * share(socialNet: string, fab: FabContainer) { * fab.close(); * console.log("Sharing in", socialNet); * } * ``` * * @demo /docs/demos/src/fab/ * @see {@link /docs/components#fabs FAB Component Docs} */ export class FabContainer { constructor(plt) { /** * @hidden */ this._listsActive = false; this._events = new UIEventManager(plt); } /** * @hidden */ ngAfterContentInit() { const mainButton = this._mainButton; if (!mainButton || !mainButton.getNativeElement()) { console.error('FAB container needs a main