UNPKG

ionic-framework

Version:

The ionic-framework package comes with both Javascript and Sass frontend dependencies, located in the root of the package, and a Node API, located in `tooling/`.

41 lines (40 loc) 1.64 kB
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = require('angular2/core'); /** * @name Blur * @description * The blur attribute applies the CSS blur attribute to an element. If the CSS attribute is not supported, * it will fall back to applying a semi-transparent background color to the element. * * @usage * ```html * <ion-card blur> * This card will blur the content behind it. * </ion-card> * ``` * * @demo /docs/v2/demos/blur/ */ var Blur = (function () { function Blur(_elementRef, _renderer) { this._elementRef = _elementRef; this._renderer = _renderer; _renderer.setElementStyle(_elementRef, '-webkit-backdrop-filter', 'blur(10px)'); } Blur = __decorate([ core_1.Directive({ selector: '[blur]' }), __metadata('design:paramtypes', [core_1.ElementRef, core_1.Renderer]) ], Blur); return Blur; })(); exports.Blur = Blur;