Skip to content

Commit 7a57a43

Browse files
authored
Fixed icon alignment (#39)
* Fixed icon alignment * Fix overlay width and height * Update version
1 parent c740b0f commit 7a57a43

File tree

6 files changed

+8
-10
lines changed

6 files changed

+8
-10
lines changed

css/timed-dialog.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* jQuery Timed Dialog Plugin stylesheet
2+
* jQuery Timed Dialog Plugin style sheet
33
* Author: Armino Popp, <[email protected]>
44
*/
55
.timed-dialog-overlay {
@@ -29,7 +29,6 @@ button {
2929
align-items: center;
3030
background-color: #1055aa;
3131
color: white;
32-
line-height: 1.2rem;
3332
padding: 5px 10px;
3433
border-top-left-radius: 5px;
3534
border-top-right-radius: 5px; }

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ <h3>2.3. Complex confirmation modal</h3>
140140
options = {
141141
type: 'info',
142142
title: 'Info',
143-
body: '<p>This is an info modal with autoclose on timer. You can insert html markup also.</p>',
143+
body: '<p>This is an info modal with auto close on timer. You can insert html markup also.</p>',
144144
width: 400,
145145
height: 280,
146146
timeout: 5,

dist/timed-dialog.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@armino-dev/jquery-timed-dialog",
33
"title": "jQuery Timed Dialog",
4-
"version": "1.0.3",
4+
"version": "1.0.4",
55
"description": "A jQuery timed dialog UI",
66
"homepage": "https://github.com/armino-dev/jquery-timed-dialog#readme",
77
"main": "dist/timed-dialog.min.js",

scss/timed-dialog.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* jQuery Timed Dialog Plugin stylesheet
2+
* jQuery Timed Dialog Plugin style sheet
33
* Author: Armino Popp, <[email protected]>
44
*/
55

@@ -39,7 +39,6 @@ button {
3939

4040
background-color: $header-bg-color;
4141
color: white;
42-
line-height: 1.2rem;
4342
padding: 5px 10px;
4443
border-top-left-radius: 5px;
4544
border-top-right-radius: 5px;

src/timed-dialog.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
const heights = [body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight];
3434
const widths = [body.scrollWidth, body.offsetWidth, html.clientWidth, html.scrollWidth, html.offsetWidth];
3535

36-
const documentHeight = Math.max(heights);
37-
const documentWidth = Math.max(widths);
36+
const documentHeight = Math.max(...heights);
37+
const documentWidth = Math.max(...widths);
3838

3939
const allowedTypes = {
4040
info: {
@@ -83,7 +83,7 @@
8383
const dialog = $(`
8484
<div id="${containerId}" class="timed-dialog">
8585
<div class="header">
86-
<div class="icon">${settings.icon}</div>
86+
<div class="icon"><span>${settings.icon}</span></div>
8787
<h1 class="title">${settings.title}</h1>
8888
</div>
8989
<div class="body">${settings.body}</div>

0 commit comments

Comments
 (0)