kitzo 2.0.11 → 2.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/react.esm.js +15 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ npm i kitzo
|
|
|
25
25
|
or
|
|
26
26
|
|
|
27
27
|
```javascript
|
|
28
|
-
<script src="https://cdn.jsdelivr.net/npm/kitzo@2.0.
|
|
28
|
+
<script src="https://cdn.jsdelivr.net/npm/kitzo@2.0.12/dist/kitzo.umd.min.js"></script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
> Attach this script tag in the html head tag and you are good to go.
|
package/dist/react.esm.js
CHANGED
|
@@ -3,23 +3,21 @@ import React, { useRef, useLayoutEffect, useState, useEffect } from 'react';
|
|
|
3
3
|
const listeners = new Set();
|
|
4
4
|
let isStyleAdded = false;
|
|
5
5
|
function toastStyles() {
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.3);
|
|
22
|
-
}
|
|
6
|
+
return `.toast-content,
|
|
7
|
+
.toast-content-bottom {
|
|
8
|
+
font-size: 0.925rem;
|
|
9
|
+
}
|
|
10
|
+
.toast-content,
|
|
11
|
+
.toast-content-bottom {
|
|
12
|
+
pointer-events: all;
|
|
13
|
+
padding-inline: 0.625rem 0.825rem;
|
|
14
|
+
padding-block: 0.625rem;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: 0.5rem;
|
|
18
|
+
background-color: white;
|
|
19
|
+
border-radius: 0.5525rem;
|
|
20
|
+
box-shadow: 0 2px 8px -3px rgba(0, 0, 0, 0.3);
|
|
23
21
|
}
|
|
24
22
|
|
|
25
23
|
.toast-content {
|
|
@@ -348,7 +346,6 @@ function Toast({
|
|
|
348
346
|
const transformY = position.includes('bottom') ? `translateY(-${toast.offset || 0}px)` : `translateY(${toast.offset || 0}px)`;
|
|
349
347
|
return /*#__PURE__*/React.createElement("div", {
|
|
350
348
|
ref: ref,
|
|
351
|
-
className: "toast",
|
|
352
349
|
style: {
|
|
353
350
|
transform: transformY,
|
|
354
351
|
...getToastPosition(position)
|