@mohamed-karawia/library 0.1.16 → 0.1.17
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
- package/dist/stories/Library/Folders/Folders.js +1 -1
- package/dist/stories/Pages/Library/Folders/Library.js +2 -1
- package/package.json +1 -1
- package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
- package/src/stories/Library/Folders/Folders.jsx +1 -1
- package/src/stories/Pages/Library/Folders/Library.jsx +1 -0
@@ -17,7 +17,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
17
17
|
|
18
18
|
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
19
19
|
|
20
|
-
var _reactEditorJs =
|
20
|
+
var _reactEditorJs = require("react-editor-js");
|
21
21
|
|
22
22
|
var _constants = require("./constants");
|
23
23
|
|
@@ -30,6 +30,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
30
30
|
var EditorComponent = function EditorComponent(props) {
|
31
31
|
var _instanceRef = (0, _react.useRef)(null);
|
32
32
|
|
33
|
+
var ReactEditorJS = (0, _reactEditorJs.createReactEditorJS)();
|
34
|
+
|
33
35
|
function handleSave() {
|
34
36
|
return _handleSave.apply(this, arguments);
|
35
37
|
}
|
@@ -58,7 +60,7 @@ var EditorComponent = function EditorComponent(props) {
|
|
58
60
|
return _handleSave.apply(this, arguments);
|
59
61
|
}
|
60
62
|
|
61
|
-
return /*#__PURE__*/_react.default.createElement(Container, props, /*#__PURE__*/_react.default.createElement(
|
63
|
+
return /*#__PURE__*/_react.default.createElement(Container, props, /*#__PURE__*/_react.default.createElement(ReactEditorJS, {
|
62
64
|
instanceRef: function instanceRef(instance) {
|
63
65
|
return _instanceRef.current = instance;
|
64
66
|
},
|
@@ -113,7 +113,7 @@ var Folders = function Folders(_ref) {
|
|
113
113
|
})));
|
114
114
|
};
|
115
115
|
|
116
|
-
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color:
|
116
|
+
var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background-color: transparent;\n"])));
|
117
117
|
|
118
118
|
Folders.defaultProps = {};
|
119
119
|
var _default = Folders;
|
@@ -113,7 +113,8 @@ var Library = function Library(props) {
|
|
113
113
|
controlsStyles: {
|
114
114
|
showOnHover: true
|
115
115
|
}
|
116
|
-
}
|
116
|
+
},
|
117
|
+
cardClicked: cardClicked
|
117
118
|
}
|
118
119
|
})), /*#__PURE__*/_react.default.createElement(_Center.default, null, /*#__PURE__*/_react.default.createElement(_SpaceContainer.default, {
|
119
120
|
title: "Music Album",
|
package/package.json
CHANGED
@@ -4,14 +4,14 @@ import PropTypes from "prop-types";
|
|
4
4
|
import styled from 'styled-components';
|
5
5
|
|
6
6
|
// Editor.js
|
7
|
-
import
|
7
|
+
import { createReactEditorJS } from 'react-editor-js'
|
8
8
|
// Editor.js Constants
|
9
9
|
import { EDITOR_JS_TOOLS } from "./constants";
|
10
10
|
|
11
11
|
|
12
12
|
const EditorComponent = (props) => {
|
13
13
|
const instanceRef = useRef(null)
|
14
|
-
|
14
|
+
const ReactEditorJS = createReactEditorJS()
|
15
15
|
|
16
16
|
async function handleSave() {
|
17
17
|
const savedData = await instanceRef.current.save()
|
@@ -20,7 +20,7 @@ const EditorComponent = (props) => {
|
|
20
20
|
|
21
21
|
return (
|
22
22
|
<Container {...props}>
|
23
|
-
<
|
23
|
+
<ReactEditorJS
|
24
24
|
instanceRef={(instance) => (instanceRef.current = instance)}
|
25
25
|
tools={EDITOR_JS_TOOLS}
|
26
26
|
data={props.data}
|