https://github.com/kouyjes/h-dialog
https://github.com/kouyjes/h-dialog
alert dialog error info panel warn window
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/kouyjes/h-dialog
- Owner: kouyjes
- Created: 2017-08-14T02:44:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-10-19T08:07:53.000Z (over 8 years ago)
- Last Synced: 2025-01-31T22:06:34.930Z (over 1 year ago)
- Topics: alert, dialog, error, info, panel, warn, window
- Language: JavaScript
- Size: 42 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
## Get Started
### Demo
[Demo url](https://kouyjes.github.io/h-dialog/example/index.html)
### Interface
```javascript
interface PanelOption{
el:HTMLElement;
contentElements?:any[];
}
enum Align{
LEFT = 'left',
RIGHT = 'right',
CENTER = 'center'
}
interface InfoPanelOption extends PanelOption{
autoRemove:boolean;
autoRemoveTime:number;
css:Object;
align:Align;
}
interface InfoDialogOption extends InfoPanelOption{
type?:InfoDialogType;
content:String;
maxHeight:String;
html?:any;
}
enum InfoDialogType{
INFO = 'info',
WARN = 'warn',
ERROR = 'error'
}
```
### InfoPanel Example
```javascript
var InfoWindow = HERE.UI.InfoWindow;
var template = '
text';
InfoWindow.show({
autoRemove:true,
autoRemoveTime:5000,
css:{
backgroundColor:'#ccc'
},
contentElements:[template]
});
```
### InfoDialog Example
```javascript
var Dialog = HERE.UI.InfoDialog;
Dialog.info({
maxHeight:'200px', // String optional
content:'content text',
html:'',// string or dom
autoRemove:true, // boolean optional
autoRemoveTime:timeout // timeout in ms ,optional
});
```