native-document 1.0.202 → 1.0.203
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "native-document",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.203",
|
|
4
4
|
"description": "A reactive JavaScript framework that preserves native DOM simplicity without sacrificing modern features",
|
|
5
5
|
"author": "AfroCodeur <https://github.com/afrocodeur>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,6 +51,7 @@ export default function Drawer(content = null, props = {}) {
|
|
|
51
51
|
renderHeader: null,
|
|
52
52
|
backdrop: true,
|
|
53
53
|
isOpen: null,
|
|
54
|
+
closeIcon: null,
|
|
54
55
|
props,
|
|
55
56
|
};
|
|
56
57
|
this.aria = {
|
|
@@ -341,4 +342,13 @@ Drawer.prototype.onOpen = function(handler) {
|
|
|
341
342
|
Drawer.prototype.onClose = function(handler) {
|
|
342
343
|
this.on('close', handler);
|
|
343
344
|
return this;
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* @param {NdChild} icon
|
|
349
|
+
* @return {this}
|
|
350
|
+
*/
|
|
351
|
+
Drawer.prototype.closeIcon = function(icon) {
|
|
352
|
+
this.$description.closeIcon = icon;
|
|
353
|
+
return this;
|
|
344
354
|
};
|
|
@@ -52,7 +52,7 @@ const buildDrawerHeader = ($desc, instance, closeFn) => {
|
|
|
52
52
|
$desc.subtitle ? Paragraph({ class: 'drawer-sub-title' }, $desc.subtitle) : null,
|
|
53
53
|
]),
|
|
54
54
|
$desc.closable
|
|
55
|
-
? Button({ type: 'button', class: 'drawer-close', 'aria-label': 'Close menu' }, 'X').onClick(closeFn)
|
|
55
|
+
? Button({ type: 'button', class: 'drawer-close', 'aria-label': 'Close menu' }, $desc.closeIcon ?? 'X').onClick(closeFn)
|
|
56
56
|
: null,
|
|
57
57
|
];
|
|
58
58
|
};
|