Skip to content

Commit c10db88

Browse files
committed
fix: notification
1 parent 786ffc4 commit c10db88

4 files changed

Lines changed: 7 additions & 6 deletions

File tree

demo/index.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,15 @@
6666
function summon_messagebox() {
6767
document.body.insertAdjacentHTML("beforeend", `<swift-messagebox iconpath="../Logo.png">
6868
<p slot="title">Messagebox</p>
69-
<p slot="text">This message box is part of WebSwift, designed with reference to Apple Design Resources.</p>
69+
<p slot="text">This message box is part of WebSwift, designed by Apple in California</p>
7070
<swift-button primary slot="button" onclick="this.parentNode.remove()">OK</swift-button>
7171
</swift-messagebox>`);
7272
}
7373

7474
function summon_notification() {
75-
document.body.insertAdjacentHTML("beforeend", `<swift-notification iconpath="../Logo.png">
75+
document.body.insertAdjacentHTML("beforeend", `<swift-notification iconpath="../Logo.png" onclick="this.remove()">
7676
<p slot="title">Notification</p>
77-
<p slot="text">This notification is part of WebSwift, designed with reference to Apple Design Resources.</p>
77+
<p slot="text">This notification is part of WebSwift, designed by Apple in California</p>
7878
<p slot="time">now</p>
7979
</swift-notification>`);
8080
}

docs/overrides/js/webswift.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.

src/notification.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class Notification extends initElement({
4848
-webkit-backdrop-filter: blur(30px);
4949
backdrop-filter: blur(30px);
5050
animation: in 0.4s ease;
51-
padding: 13px 0;
5251
}
5352
:host(.close) {
5453
animation: out 0.4s ease;
@@ -65,6 +64,7 @@ class Notification extends initElement({
6564
color: rgba(0, 0, 0, 0.85);
6665
line-height: 16px;
6766
margin: 0;
67+
margin-top: 13px;
6868
}
6969
::slotted([slot=text]) {
7070
font-family: "SFPro-Regular", "PingFangSC-Regular";
@@ -74,6 +74,7 @@ class Notification extends initElement({
7474
line-height: 16px;
7575
width: 255px;
7676
margin: 0;
77+
margin-bottom: 13px;
7778
}
7879
::slotted([slot=time]) {
7980
font-family: "SFPro-Regular", "PingFangSC-Regular";

webswift.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.

0 commit comments

Comments
 (0)