mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
feat(blur): iOS Blur Directive
This commit is contained in:
11
ionic/components/blur/blur.ts
Normal file
11
ionic/components/blur/blur.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import {Directive, Renderer, ElementRef} from 'angular2/angular2';
|
||||
|
||||
@Directive({
|
||||
selector: '[ion-blur]'
|
||||
})
|
||||
export class Blur {
|
||||
constructor(private elementRef: ElementRef, private renderer: Renderer) {
|
||||
console.log('Blur renderer', renderer);
|
||||
renderer.setElementStyle(elementRef, '-webkit-backdrop-filter', 'blur(10px)');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user