mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
chore(): begin adding ionic components to mono-repo.
This commit is contained in:
26
packages/ionic-angular/src/components/backdrop/backdrop.scss
Normal file
26
packages/ionic-angular/src/components/backdrop/backdrop.scss
Normal file
@ -0,0 +1,26 @@
|
||||
@import "../../themes/ionic.globals";
|
||||
|
||||
// Backdrop
|
||||
// --------------------------------------------------
|
||||
|
||||
/// @prop - Color of the backdrop
|
||||
$backdrop-color: #000 !default;
|
||||
|
||||
ion-backdrop {
|
||||
@include position(0, null, null, 0);
|
||||
|
||||
position: absolute;
|
||||
z-index: $z-index-backdrop;
|
||||
display: block;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
background-color: $backdrop-color;
|
||||
opacity: .01;
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
ion-backdrop.backdrop-no-tappable {
|
||||
cursor: auto;
|
||||
}
|
26
packages/ionic-angular/src/components/backdrop/backdrop.ts
Normal file
26
packages/ionic-angular/src/components/backdrop/backdrop.ts
Normal file
@ -0,0 +1,26 @@
|
||||
import { Directive, ElementRef, Renderer } from '@angular/core';
|
||||
|
||||
/**
|
||||
* @hidden
|
||||
*/
|
||||
@Directive({
|
||||
selector: 'ion-backdrop',
|
||||
host: {
|
||||
'role': 'presentation',
|
||||
'tappable': '',
|
||||
'disable-activated': ''
|
||||
},
|
||||
})
|
||||
export class Backdrop {
|
||||
constructor(private _elementRef: ElementRef, private _renderer: Renderer) {
|
||||
}
|
||||
|
||||
getNativeElement(): HTMLElement {
|
||||
return this._elementRef.nativeElement;
|
||||
}
|
||||
|
||||
setElementClass(className: string, add: boolean) {
|
||||
this._renderer.setElementClass(this._elementRef.nativeElement, className, add);
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user