-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76ea5cd
commit 1c047ae
Showing
6 changed files
with
94 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# [ESL](../../../README.md) Alert | ||
|
||
Version: *1.0.0-beta* | ||
|
||
***Important Notice: the component is under beta version, it tested and ready to use but be aware of its potential critical API changes*** | ||
|
||
Authors: *Julia Murashko* | ||
|
||
ESLAlert is a simple component to show small notification on your pages | ||
|
||
--- | ||
|
||
##Usage | ||
|
||
Firstly, register component using static `ESLAlert.init` method. | ||
Then the following events can be dispatched globally (on window) to control alert: | ||
- `esl:alert:show` to show alert | ||
- `esl:alert:hide` to hide alert | ||
|
||
Use custom event details to customize alert. | ||
|
||
Description TBD. | ||
|
||
## Example | ||
|
||
```javascript | ||
window.dispatchEvent(new CustomEvent(`esl:alert:show`, { | ||
detail: { | ||
text: 'Hello World', | ||
cls: 'alert alert-info' | ||
} | ||
})); | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.ie-zindex-fix { | ||
position: absolute; | ||
top: 0; | ||
left: 0; | ||
height: 100%; | ||
width: 100%; | ||
z-index: -1; | ||
border: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/** Fix IE browser to allow to display alert under iframe */ | ||
export function createIframe(): HTMLElement { | ||
const iframe = document.createElement('iframe'); | ||
iframe.className = 'ie-zindex-fix'; | ||
iframe.src = 'about:blank'; | ||
return iframe; | ||
} |