@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.
@@ -17,7 +17,7 @@ var _react = _interopRequireWildcard(require("react"));
17
17
 
18
18
  var _styledComponents = _interopRequireDefault(require("styled-components"));
19
19
 
20
- var _reactEditorJs = _interopRequireDefault(require("react-editor-js"));
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(_reactEditorJs.default, {
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: black;\n"])));
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
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  ]
12
12
  },
13
- "version": "0.1.16",
13
+ "version": "0.1.17",
14
14
  "private": false,
15
15
  "dependencies": {
16
16
  "@babel/cli": "^7.16.7",
@@ -4,14 +4,14 @@ import PropTypes from "prop-types";
4
4
  import styled from 'styled-components';
5
5
 
6
6
  // Editor.js
7
- import EditorJs from 'react-editor-js';
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
- <EditorJs
23
+ <ReactEditorJS
24
24
  instanceRef={(instance) => (instanceRef.current = instance)}
25
25
  tools={EDITOR_JS_TOOLS}
26
26
  data={props.data}
@@ -85,7 +85,7 @@ const Folders = ({
85
85
  }
86
86
 
87
87
  const Container = styled.div`
88
- background-color: black;
88
+ background-color: transparent;
89
89
  `
90
90
 
91
91
  Folders.defaultProps = {};
@@ -84,6 +84,7 @@ const Library = (props) => {
84
84
  showOnHover: true,
85
85
  }
86
86
  },
87
+ cardClicked
87
88
  }}
88
89
  />
89
90
  </Left>