@vonaffenfels/slate-editor 1.1.0 → 1.1.3
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/dist/BlockEditor.css +2 -2
- package/dist/BlockEditor.js +1 -1
- package/dist/index.css +2 -2
- package/dist/index.js +1 -1
- package/package.json +2 -2
- package/scss/editor.scss +11 -0
- package/scss/storybook.scss +1 -0
- package/src/SidebarEditor/Resizable.js +4 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonaffenfels/slate-editor",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"cssnano": "^5.0.1",
|
|
72
72
|
"escape-html": "^1.0.3"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "9bb577c35e6bd63588821abb46c9a3d4d400bda2",
|
|
75
75
|
"publishConfig": {
|
|
76
76
|
"access": "public"
|
|
77
77
|
}
|
package/scss/editor.scss
CHANGED
|
@@ -427,11 +427,22 @@
|
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
.resizable {
|
|
430
|
+
|
|
431
|
+
&.enabled {
|
|
432
|
+
.resizable-left {
|
|
433
|
+
max-width: calc(100vw - 300px);
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
430
437
|
.resizable-left {
|
|
438
|
+
scrollbar-width: none;
|
|
439
|
+
max-width: 100vw;
|
|
431
440
|
position: relative;
|
|
432
441
|
}
|
|
433
442
|
|
|
434
443
|
.resizable-right {
|
|
444
|
+
scrollbar-width: none;
|
|
445
|
+
max-width: calc(100vw - 300px);
|
|
435
446
|
position: relative;
|
|
436
447
|
}
|
|
437
448
|
|
package/scss/storybook.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useEffect, useRef,
|
|
3
3
|
} from "react";
|
|
4
|
+
import classNames from "classnames";
|
|
4
5
|
|
|
5
6
|
export const Resizable = ({
|
|
6
7
|
left,
|
|
@@ -73,7 +74,9 @@ export const Resizable = ({
|
|
|
73
74
|
}
|
|
74
75
|
}, [right, left]);
|
|
75
76
|
|
|
76
|
-
return <div
|
|
77
|
+
return <div
|
|
78
|
+
className={classNames("resizable flex w-full", {"enabled": !!right})}
|
|
79
|
+
ref={containerRef}>
|
|
77
80
|
<div ref={leftRef} className="resizable-left grow">{left}</div>
|
|
78
81
|
{right && <div ref={rightRef} className="resizable-right shrink-0">
|
|
79
82
|
<div ref={handleRef} className="resizable-x-handle"/>
|