@mohamed-karawia/library 0.1.10 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/dist/stories/Events/Event/Event.js +5 -9
  2. package/dist/stories/Events/EventsList/EventsList.js +2 -19
  3. package/dist/stories/Library/Folders/Folders.js +3 -8
  4. package/dist/stories/Library/Notes/Notes.js +2 -19
  5. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +2 -10
  6. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +1 -12
  7. package/dist/stories/Pages/Chat/Chat.js +3 -0
  8. package/dist/stories/Pages/Events/Event/Event.js +9 -3
  9. package/dist/stories/Pages/Events/Events/Events.js +14 -1
  10. package/dist/stories/Pages/Library/Folders/Library.js +4 -0
  11. package/dist/stories/Pages/Library/Notes/Notes.js +15 -1
  12. package/dist/stories/Pages/Music/MusicAlbum/Music.js +9 -1
  13. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +15 -1
  14. package/dist/stories/Pages/Photos/Albums/Albums.js +6 -1
  15. package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -1
  16. package/dist/stories/Pages/Video/VideoAlbum/Video.js +14 -1
  17. package/dist/stories/Pages/ViewWorld/constatnts.js +9 -5
  18. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +0 -3
  19. package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +7 -1
  20. package/dist/stories/Reusable Components/Gallery/Gallery.js +2 -2
  21. package/dist/stories/Reusable Components/WidgetContainer/WidgetContainer.js +7 -2
  22. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +5 -3
  23. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +0 -11
  24. package/dist/stories/helpers/util.js +11 -4
  25. package/package.json +2 -2
  26. package/src/stories/Events/Event/Event.jsx +3 -6
  27. package/src/stories/Events/EventsList/EventsList.jsx +1 -17
  28. package/src/stories/Library/Folders/Folders.jsx +2 -6
  29. package/src/stories/Library/Notes/Notes.jsx +1 -17
  30. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +1 -8
  31. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +2 -10
  32. package/src/stories/Pages/Chat/Chat.jsx +1 -0
  33. package/src/stories/Pages/Events/Event/Event.jsx +8 -2
  34. package/src/stories/Pages/Events/Events/Events.jsx +13 -0
  35. package/src/stories/Pages/Library/Folders/Library.jsx +7 -1
  36. package/src/stories/Pages/Library/Notes/Notes.jsx +25 -11
  37. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +9 -1
  38. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +16 -1
  39. package/src/stories/Pages/Photos/Albums/Albums.jsx +5 -0
  40. package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +2 -1
  41. package/src/stories/Pages/Video/VideoAlbum/Video.jsx +13 -1
  42. package/src/stories/Pages/ViewWorld/constatnts.js +6 -6
  43. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +0 -1
  44. package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -1
  45. package/src/stories/Reusable Components/Gallery/Gallery.jsx +2 -2
  46. package/src/stories/Reusable Components/WidgetContainer/WidgetContainer.jsx +7 -1
  47. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +3 -1
  48. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +0 -9
  49. package/src/stories/helpers/util.js +4 -4
@@ -27,18 +27,14 @@ var Event = function Event(_ref) {
27
27
  titleSize = _ref.titleSize,
28
28
  dateColor = _ref.dateColor,
29
29
  dateSize = _ref.dateSize,
30
- headerBackground = _ref.headerBackground,
31
- headerTitleColor = _ref.headerTitleColor,
32
30
  discColor = _ref.discColor,
33
- discSize = _ref.discSize;
31
+ discSize = _ref.discSize,
32
+ headerStyles = _ref.headerStyles;
34
33
  return /*#__PURE__*/_react.default.createElement(Container, {
35
34
  backgroundColor: backgroundColor
36
- }, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, {
37
- title: "Event",
38
- padding: 10,
39
- headerBackground: headerBackground,
40
- titleColor: headerTitleColor
41
- }), /*#__PURE__*/_react.default.createElement(CoverWrapper, null, /*#__PURE__*/_react.default.createElement(Cover, {
35
+ }, /*#__PURE__*/_react.default.createElement(_ReusableHeader.default, Object.assign({
36
+ title: title
37
+ }, headerStyles)), /*#__PURE__*/_react.default.createElement(CoverWrapper, null, /*#__PURE__*/_react.default.createElement(Cover, {
42
38
  src: cover
43
39
  })), /*#__PURE__*/_react.default.createElement(Details, null, /*#__PURE__*/_react.default.createElement(Header, null, /*#__PURE__*/_react.default.createElement(Title, {
44
40
  size: titleSize,
@@ -85,34 +85,17 @@ var EventsList = function EventsList(_ref) {
85
85
  props.onAddEvent(event);
86
86
  };
87
87
 
88
- return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, {
88
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
89
89
  listTitle: "My Events",
90
90
  data: events,
91
91
  type: "flat",
92
92
  cardStyle: "card-style-11",
93
- headerStyles: {
94
- padding: 10,
95
- headerBackground: '#FE1744',
96
- titleColor: '#ffff',
97
- controlsStyles: {
98
- iconSize: 25
99
- }
100
- },
101
- customCardStyles: {
102
- iconColor: iconColor,
103
- cardTitleFontSize: cardTitleFontSize,
104
- cardTitleColor: cardTitleColor,
105
- cardPadding: cardPadding,
106
- controlsStyles: {
107
- iconColor: '#FE1744'
108
- }
109
- },
110
93
  listControls: listControls,
111
94
  cardControls: cardControls,
112
95
  iconClicked: onIconClicked,
113
96
  cardClicked: cardClicked,
114
97
  cardIconClicked: cardIconClicked
115
- }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
98
+ }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
116
99
  modalIsOpen: showModal,
117
100
  closeModal: function closeModal() {
118
101
  return setShowModal(false);
@@ -27,7 +27,7 @@ var _CreateFolder = _interopRequireDefault(require("../CreateFolder/CreateFolder
27
27
 
28
28
  var _templateObject;
29
29
 
30
- var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor", "headerStyles"];
30
+ var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor"];
31
31
 
32
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
33
 
@@ -52,7 +52,6 @@ var Folders = function Folders(_ref) {
52
52
  rowGap = _ref.rowGap,
53
53
  cardClicked = _ref.cardClicked,
54
54
  iconColor = _ref.iconColor,
55
- headerStyles = _ref.headerStyles,
56
55
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
57
56
 
58
57
  var _useState = (0, _react.useState)(false),
@@ -84,12 +83,12 @@ var Folders = function Folders(_ref) {
84
83
  setShowModal(false);
85
84
  };
86
85
 
86
+ console.log(props);
87
87
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
88
88
  galleryTitle: "Your Folders",
89
89
  data: folders,
90
90
  type: "flat",
91
91
  cardStyle: "card-style-10",
92
- headerStyles: headerStyles,
93
92
  columnsNumber: columnsNumber,
94
93
  galleryColumnGap: columnGap,
95
94
  galleryRowGap: rowGap,
@@ -98,11 +97,7 @@ var Folders = function Folders(_ref) {
98
97
  cardClicked: cardClicked,
99
98
  cardIconClicked: cardIconClicked,
100
99
  cardControls: cardControls,
101
- rowsHeight: 140,
102
- customCardStyles: {
103
- cardPadding: 10,
104
- iconColor: iconColor
105
- }
100
+ rowsHeight: 140
106
101
  }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
107
102
  modalIsOpen: showModal,
108
103
  closeModal: function closeModal() {
@@ -85,34 +85,17 @@ var Notes = function Notes(_ref) {
85
85
  setShowModal(false);
86
86
  };
87
87
 
88
- return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, {
88
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
89
89
  listTitle: "My Notes",
90
90
  data: notes,
91
91
  type: "flat",
92
92
  cardStyle: "card-style-11",
93
- headerStyles: {
94
- padding: 10,
95
- headerBackground: '#FE1744',
96
- titleColor: '#ffff',
97
- controlsStyles: {
98
- iconSize: 25
99
- }
100
- },
101
- customCardStyles: {
102
- iconColor: iconColor,
103
- cardTitleFontSize: cardTitleFontSize,
104
- cardTitleColor: cardTitleColor,
105
- cardPadding: cardPadding,
106
- controlsStyles: {
107
- iconColor: '#FE1744'
108
- }
109
- },
110
93
  listControls: listControls,
111
94
  cardControls: cardControls,
112
95
  iconClicked: onIconClicked,
113
96
  cardClicked: cardClicked,
114
97
  cardIconClicked: cardIconClicked
115
- }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
98
+ }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
116
99
  modalIsOpen: showModal,
117
100
  closeModal: function closeModal() {
118
101
  return setShowModal(false);
@@ -79,17 +79,9 @@ var ViewAlbum = function ViewAlbum(_ref) {
79
79
  setShowModal(false);
80
80
  };
81
81
 
82
- return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, {
82
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
83
83
  listTitle: "My Album",
84
84
  data: album,
85
- headerStyles: {
86
- padding: 10,
87
- headerBackground: 'black',
88
- titleColor: '#ffff',
89
- controlsStyles: {
90
- iconSize: 25
91
- }
92
- },
93
85
  cardStyle: "card-style-7",
94
86
  type: "flat",
95
87
  cardClicked: function cardClicked(index) {
@@ -106,7 +98,7 @@ var ViewAlbum = function ViewAlbum(_ref) {
106
98
  iconColor: 'black'
107
99
  }
108
100
  }
109
- }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
101
+ }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
110
102
  modalIsOpen: showModal,
111
103
  closeModal: function closeModal() {
112
104
  return setShowModal(false);
@@ -101,27 +101,16 @@ var ViewAlbums = function ViewAlbums(_ref) {
101
101
  };
102
102
 
103
103
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
104
- galleryTitle: "Music Albums",
104
+ galleryTitle: props.title,
105
105
  data: albums,
106
106
  type: "flat",
107
107
  cardStyle: "card-style-6",
108
- headerStyles: {
109
- padding: 10,
110
- headerBackground: 'black',
111
- titleColor: '#ffff',
112
- controlsStyles: {
113
- iconSize: 25
114
- }
115
- },
116
108
  columnsNumber: 3,
117
109
  galleryColumnGap: 10,
118
110
  galleryRowGap: 20,
119
111
  galleryControls: galleryControls,
120
112
  iconClicked: onHeaderIconClicked,
121
113
  cardControls: cardControls,
122
- cardClicked: function cardClicked() {
123
- return null;
124
- },
125
114
  cardIconClicked: cardIconClicked,
126
115
  customCardStyles: cardStyles
127
116
  }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
@@ -71,6 +71,9 @@ var Chat = function Chat(_ref) {
71
71
  showOnHover: true
72
72
  }
73
73
  }
74
+ },
75
+ cardClicked: function cardClicked(path) {
76
+ return alert(path);
74
77
  }
75
78
  })), /*#__PURE__*/_react.default.createElement(_Center.default, null, /*#__PURE__*/_react.default.createElement(_SpaceContainer.default, {
76
79
  title: "Music Album",
@@ -77,11 +77,17 @@ var Event = function Event(props) {
77
77
  date: "15/11/1976 : 16/11/1976",
78
78
  disc: "Lorem ipsum dolor sit amet consectetur adipisicing elit. Officia impedit fugiat reprehenderit adipisci eos atque ullam error quia amet nihil, exercitationem beatae distinctio eligendi neque, consequuntur odit commodi id porro.",
79
79
  backgroundColor: "black",
80
- headerBackground: "black",
81
- headerTitleColor: "white",
82
80
  titleColor: "white",
83
81
  discColor: "white",
84
- dateColor: "white"
82
+ dateColor: "white",
83
+ headerStyles: {
84
+ padding: 10,
85
+ headerBackground: 'black',
86
+ titleColor: '#ffff',
87
+ controlsStyles: {
88
+ iconSize: 25
89
+ }
90
+ }
85
91
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
86
92
  };
87
93
 
@@ -117,7 +117,20 @@ var Events = function Events(props) {
117
117
  iconColor: "#FE1744",
118
118
  cardTitleFontSize: 15,
119
119
  onAddEvent: onAddEvent,
120
- cardIconClicked: cardIconClicked
120
+ cardIconClicked: cardIconClicked,
121
+ headerStyles: {
122
+ padding: 10,
123
+ headerBackground: '#FE1744',
124
+ titleColor: '#ffff',
125
+ controlsStyles: {
126
+ iconSize: 25
127
+ }
128
+ },
129
+ customCardStyles: {
130
+ controlsStyles: {
131
+ iconColor: '#FE1744'
132
+ }
133
+ }
121
134
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
122
135
  };
123
136
 
@@ -128,6 +128,10 @@ var Library = function Library(props) {
128
128
  controlsStyles: {
129
129
  iconSize: 25
130
130
  }
131
+ },
132
+ customCardStyles: {
133
+ cardPadding: 10,
134
+ iconColor: '#ff2d2d'
131
135
  }
132
136
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
133
137
  };
@@ -115,7 +115,21 @@ var Notes = function Notes(props) {
115
115
  }, /*#__PURE__*/_react.default.createElement(_Notes.default, {
116
116
  onAddNote: onAddNote,
117
117
  cardIconClicked: cardIconClicked,
118
- notes: notes
118
+ notes: notes,
119
+ headerStyles: {
120
+ padding: 10,
121
+ headerBackground: '#FE1744',
122
+ titleColor: '#ffff',
123
+ controlsStyles: {
124
+ iconSize: 25
125
+ }
126
+ },
127
+ customCardStyles: {
128
+ iconColor: '#FE1744',
129
+ controlsStyles: {
130
+ iconColor: '#FE1744'
131
+ }
132
+ }
119
133
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
120
134
  };
121
135
 
@@ -183,7 +183,15 @@ var Music = function Music(props) {
183
183
  album: album,
184
184
  onAddSong: onAddSong,
185
185
  cardIconClicked: cardIconClicked,
186
- cardClicked: onPlaySong
186
+ cardClicked: onPlaySong,
187
+ headerStyles: {
188
+ padding: 10,
189
+ headerBackground: 'black',
190
+ titleColor: '#ffff',
191
+ controlsStyles: {
192
+ iconSize: 25
193
+ }
194
+ }
187
195
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
188
196
  widgetType: "music player",
189
197
  controlsStyles: {
@@ -111,6 +111,10 @@ var MusicAlbums = function MusicAlbums(props) {
111
111
  setAlbums((0, _util.deleteFromArrayByIndex)(albums, index));
112
112
  };
113
113
 
114
+ var cardClicked = function cardClicked(index, cardProps) {
115
+ console.log(cardProps);
116
+ };
117
+
114
118
  return /*#__PURE__*/_react.default.createElement(_BaseMaterial.default, Object.assign({}, _styles.default.containerStyle, props), /*#__PURE__*/_react.default.createElement(_Navbar.default, null), /*#__PURE__*/_react.default.createElement(_Body.default, _styles.default.bodyStyle, /*#__PURE__*/_react.default.createElement(_Left.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
115
119
  widgetType: "logo",
116
120
  widgetProps: {
@@ -145,9 +149,19 @@ var MusicAlbums = function MusicAlbums(props) {
145
149
  discription: "Lorem ipsum dolor sit amet consectetur.",
146
150
  hideTitle: true
147
151
  }, /*#__PURE__*/_react.default.createElement(_ViewAlbums.default, {
152
+ title: "Music Albums",
148
153
  albums: albums,
149
154
  cardIconClicked: cardIconClicked,
150
- onAddAlbum: onAddAlbum
155
+ onAddAlbum: onAddAlbum,
156
+ headerStyles: {
157
+ padding: 10,
158
+ headerBackground: 'black',
159
+ titleColor: '#ffff',
160
+ controlsStyles: {
161
+ iconSize: 25
162
+ }
163
+ },
164
+ cardClicked: cardClicked
151
165
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
152
166
  };
153
167
 
@@ -105,6 +105,10 @@ var Albums = function Albums(props) {
105
105
  setAlbums((0, _util.addObjectToArray)(albums, newAlbum));
106
106
  };
107
107
 
108
+ var cardClicked = function cardClicked(index, cardProps) {
109
+ console.log(cardProps);
110
+ };
111
+
108
112
  return /*#__PURE__*/_react.default.createElement(_BaseMaterial.default, Object.assign({}, _styles.default.containerStyle, props), /*#__PURE__*/_react.default.createElement(_Navbar.default, null), /*#__PURE__*/_react.default.createElement(_Body.default, _styles.default.bodyStyle, /*#__PURE__*/_react.default.createElement(_Left.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
109
113
  widgetType: "logo",
110
114
  widgetProps: {
@@ -143,7 +147,8 @@ var Albums = function Albums(props) {
143
147
  cardIconClicked: cardIconClicked,
144
148
  onDeleteAlbum: onDeleteAlbum,
145
149
  onAddAlbum: onAddAlbum,
146
- columnsNumber: 2
150
+ columnsNumber: 2,
151
+ cardClicked: cardClicked
147
152
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
148
153
  };
149
154
 
@@ -104,7 +104,8 @@ var DetailedVideo = function DetailedVideo(props) {
104
104
  date: "10/11/2022",
105
105
  comments: comments,
106
106
  discColor: "gray",
107
- dateColor: "gray"
107
+ dateColor: "gray",
108
+ videoSrc: 'https://www.youtube.com/watch?v=vETUpJ88cfA'
108
109
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
109
110
  };
110
111
 
@@ -153,6 +153,10 @@ var Video = function Video(props) {
153
153
  setAlbum((0, _util.deleteFromArrayByIndex)(album, index));
154
154
  };
155
155
 
156
+ var cardClicked = function cardClicked(index, cardProps) {
157
+ console.log(cardProps);
158
+ };
159
+
156
160
  return /*#__PURE__*/_react.default.createElement(_BaseMaterial.default, Object.assign({}, _styles.default.containerStyle, props), /*#__PURE__*/_react.default.createElement(_Navbar.default, null), /*#__PURE__*/_react.default.createElement(_Body.default, _styles.default.bodyStyle, /*#__PURE__*/_react.default.createElement(_Left.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
157
161
  widgetType: "logo",
158
162
  widgetProps: {
@@ -190,7 +194,16 @@ var Video = function Video(props) {
190
194
  album: album,
191
195
  onAddVideo: onAddVideo,
192
196
  onDeleteSong: deleteVideoFromAlbum,
193
- cardIconClicked: cardIconClicked
197
+ cardIconClicked: cardIconClicked,
198
+ cardClicked: cardClicked,
199
+ headerStyles: {
200
+ padding: 10,
201
+ headerBackground: 'black',
202
+ titleColor: '#ffff',
203
+ controlsStyles: {
204
+ iconSize: 25
205
+ }
206
+ }
194
207
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null, /*#__PURE__*/_react.default.createElement(_WidgetContainer.default, {
195
208
  widgetType: "video player",
196
209
  controlsStyles: {
@@ -7,16 +7,20 @@ exports.MOVIES_SONGS = exports.MOVIES_DATA = exports.GAMING_SONGS = exports.GAMI
7
7
  var SPACES = [{
8
8
  title: 'Main List',
9
9
  data: [{
10
- title: 'Cargo Sprint'
10
+ title: 'Cargo Sprint',
11
+ path: 'cago'
11
12
  }, {
12
- title: 'Movies'
13
+ title: 'Movies',
14
+ path: 'movies'
13
15
  }]
14
16
  }, {
15
- title: 'Entertainment List',
17
+ title: 'Entertainment',
16
18
  data: [{
17
- title: 'Gaming'
19
+ title: 'Gaming',
20
+ path: 'games'
18
21
  }, {
19
- title: 'Music'
22
+ title: 'Music',
23
+ path: 'music'
20
24
  }]
21
25
  }];
22
26
  exports.SPACES = SPACES;
@@ -122,9 +122,6 @@ var ViewAlbums = function ViewAlbums(_ref) {
122
122
  galleryRowGap: rowGap,
123
123
  galleryControls: galleryControls,
124
124
  iconClicked: onIconClicked,
125
- cardClicked: function cardClicked() {
126
- return null;
127
- },
128
125
  cardControls: cardControls,
129
126
  cardIconClicked: cardIconClicked,
130
127
  customCardStyles: cardStyles
@@ -23,7 +23,7 @@ var _globalCardStyles = require("../globalCardStyles");
23
23
 
24
24
  var _templateObject;
25
25
 
26
- var _excluded = ["title", "description"];
26
+ var _excluded = ["title", "description", "path"];
27
27
 
28
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
29
 
@@ -32,6 +32,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
32
32
  var CardStyle3 = function CardStyle3(_ref) {
33
33
  var title = _ref.title,
34
34
  description = _ref.description,
35
+ path = _ref.path,
35
36
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
36
37
 
37
38
  var _useState = (0, _react.useState)(false),
@@ -43,7 +44,12 @@ var CardStyle3 = function CardStyle3(_ref) {
43
44
  console.log(action);
44
45
  };
45
46
 
47
+ var cardClicked = function cardClicked() {
48
+ props.cardClicked(path);
49
+ };
50
+
46
51
  return /*#__PURE__*/_react.default.createElement(_globalCardStyles.MainCard, Object.assign({
52
+ onClick: cardClicked,
47
53
  onMouseEnter: function onMouseEnter(e) {
48
54
  return setShowIcons(true);
49
55
  },
@@ -39,8 +39,8 @@ var Gallery = function Gallery(_ref) {
39
39
  props.iconClicked(action);
40
40
  };
41
41
 
42
- var clicked = function clicked(index) {
43
- props.cardClicked(index);
42
+ var clicked = function clicked(index, cardProps) {
43
+ props.cardClicked(index, cardProps);
44
44
  };
45
45
 
46
46
  var cardIconClicked = function cardIconClicked(action, index) {
@@ -29,7 +29,12 @@ var WidgetContainer = function WidgetContainer(_ref) {
29
29
  widgetControls = _ref.widgetControls,
30
30
  widgetProps = _ref.widgetProps,
31
31
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
32
- var child = (0, _util.getWidgetType)(widgetType, widgetProps);
32
+
33
+ var cardClicked = function cardClicked(path) {
34
+ props.cardClicked(path);
35
+ };
36
+
37
+ var child = (0, _util.getWidgetType)(widgetType, widgetProps, cardClicked);
33
38
 
34
39
  var iconCliked = function iconCliked(action) {
35
40
  console.log(action);
@@ -42,7 +47,7 @@ var WidgetContainer = function WidgetContainer(_ref) {
42
47
  }, props.headerStyles)), /*#__PURE__*/_react.default.createElement(Body, null, child));
43
48
  };
44
49
 
45
- var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n"])));
50
+ var Container = _styledComponents.default.div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n flex-direction: column;\n width: 100%;\n"])));
46
51
 
47
52
  var Body = _styledComponents.default.div(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0;\n padding: 0;\n"])));
48
53
 
@@ -23,10 +23,11 @@ var _RichTextInput = _interopRequireDefault(require("../../Common Inputs/RichTex
23
23
 
24
24
  var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6;
25
25
 
26
- var _excluded = ["title", "discription", "date", "users", "iconsColor", "backgroundColor", "detailsPadding", "titleFontSize", "titleColor", "dateFontSize", "dateColor", "discFontSize", "discColor", "comments", "commentBackgroundColor", "commentTitleColor", "commentTitleFontSize"];
26
+ var _excluded = ["videoSrc", "title", "discription", "date", "users", "iconsColor", "backgroundColor", "detailsPadding", "titleFontSize", "titleColor", "dateFontSize", "dateColor", "discFontSize", "discColor", "comments", "commentBackgroundColor", "commentTitleColor", "commentTitleFontSize"];
27
27
 
28
28
  var VideoSpace = function VideoSpace(_ref) {
29
- var title = _ref.title,
29
+ var videoSrc = _ref.videoSrc,
30
+ title = _ref.title,
30
31
  discription = _ref.discription,
31
32
  date = _ref.date,
32
33
  users = _ref.users,
@@ -47,7 +48,8 @@ var VideoSpace = function VideoSpace(_ref) {
47
48
  return /*#__PURE__*/_react.default.createElement(Container, {
48
49
  backgroundColor: backgroundColor
49
50
  }, /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, {
50
- iconsColor: iconsColor
51
+ iconsColor: iconsColor,
52
+ src: videoSrc
51
53
  }), /*#__PURE__*/_react.default.createElement(VideoDetails, {
52
54
  detailsPadding: detailsPadding
53
55
  }, /*#__PURE__*/_react.default.createElement(Top, null, /*#__PURE__*/_react.default.createElement(Title, {
@@ -110,23 +110,12 @@ var ViewAlbum = function ViewAlbum(_ref) {
110
110
  data: album,
111
111
  type: "flat",
112
112
  cardStyle: "card-style-6",
113
- headerStyles: {
114
- padding: 10,
115
- headerBackground: 'black',
116
- titleColor: '#ffff',
117
- controlsStyles: {
118
- iconSize: 25
119
- }
120
- },
121
113
  columnsNumber: 3,
122
114
  galleryColumnGap: 10,
123
115
  galleryRowGap: 20,
124
116
  galleryControls: galleryControls,
125
117
  iconClicked: onHeaderIconClicked,
126
118
  cardControls: cardControls,
127
- cardClicked: function cardClicked() {
128
- return null;
129
- },
130
119
  cardIconClicked: cardIconClicked,
131
120
  customCardStyles: cardStyles
132
121
  }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
@@ -88,7 +88,10 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
88
88
  'card-style-3': /*#__PURE__*/_react.default.createElement(_CardStyle3.default, Object.assign({
89
89
  key: index
90
90
  }, cardProps, customCardStyles, {
91
- cardControls: cardControls
91
+ cardControls: cardControls,
92
+ cardClicked: function cardClicked(path) {
93
+ return clicked(path);
94
+ }
92
95
  })),
93
96
  'card-style-4': /*#__PURE__*/_react.default.createElement(_CardStyle4.default, Object.assign({
94
97
  key: index
@@ -100,7 +103,7 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
100
103
  }, cardProps, customCardStyles, {
101
104
  cardControls: cardControls,
102
105
  cardClicked: function cardClicked() {
103
- return clicked(index);
106
+ return clicked(index, cardProps);
104
107
  },
105
108
  iconClicked: function iconClicked(action) {
106
109
  return cardIconClicked(action, index);
@@ -167,9 +170,13 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
167
170
 
168
171
  exports.getCardStyle = getCardStyle;
169
172
 
170
- var getWidgetType = function getWidgetType(widgetType, props) {
173
+ var getWidgetType = function getWidgetType(widgetType, props, _cardClicked) {
171
174
  var widgetTypes = {
172
- 'list': /*#__PURE__*/_react.default.createElement(_ReusableList.default, props),
175
+ 'list': /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
176
+ cardClicked: function cardClicked(path) {
177
+ return _cardClicked(path);
178
+ }
179
+ }, props)),
173
180
  'music player': /*#__PURE__*/_react.default.createElement(_MusicPlayerWidget.default, props),
174
181
  'logo': /*#__PURE__*/_react.default.createElement(_LogoWidget.default, props),
175
182
  'video player': /*#__PURE__*/_react.default.createElement(_VideoPlayer.default, props)
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  ]
12
12
  },
13
- "version": "0.1.10",
13
+ "version": "0.1.14",
14
14
  "private": false,
15
15
  "dependencies": {
16
16
  "@babel/cli": "^7.16.7",
@@ -68,7 +68,7 @@
68
68
  "build": "cross-env BABEL_ENV=production babel src -d dist",
69
69
  "test": "react-scripts test",
70
70
  "eject": "react-scripts eject",
71
- "storybook": "start-storybook -p 6006 -s public",
71
+ "storybook": "export NODE_OPTIONS=--openssl-legacy-provider; start-storybook -p 6006 -s public",
72
72
  "build-storybook": "build-storybook -s public"
73
73
  },
74
74
  "eslintConfig": {
@@ -14,19 +14,16 @@ const Event = ({
14
14
  titleSize,
15
15
  dateColor,
16
16
  dateSize,
17
- headerBackground,
18
- headerTitleColor,
19
17
  discColor,
20
18
  discSize,
19
+ headerStyles
21
20
  }) => {
22
21
  return (
23
22
  <Container
24
23
  backgroundColor={backgroundColor}>
25
24
  <ReusableHeader
26
- title='Event'
27
- padding={10}
28
- headerBackground={headerBackground}
29
- titleColor={headerTitleColor}
25
+ title={title}
26
+ {...headerStyles}
30
27
  />
31
28
  <CoverWrapper>
32
29
  <Cover src={cover} />
@@ -60,28 +60,12 @@ const EventsList = ({
60
60
  data={events}
61
61
  type='flat'
62
62
  cardStyle="card-style-11"
63
- headerStyles={{
64
- padding: 10,
65
- headerBackground: '#FE1744',
66
- titleColor: '#ffff',
67
- controlsStyles: {
68
- iconSize: 25
69
- }
70
- }}
71
- customCardStyles={{
72
- iconColor,
73
- cardTitleFontSize,
74
- cardTitleColor,
75
- cardPadding,
76
- controlsStyles: {
77
- iconColor: '#FE1744'
78
- }
79
- }}
80
63
  listControls={listControls}
81
64
  cardControls={cardControls}
82
65
  iconClicked={onIconClicked}
83
66
  cardClicked={cardClicked}
84
67
  cardIconClicked={cardIconClicked}
68
+ {...props}
85
69
  />
86
70
  <Modal
87
71
  modalIsOpen={showModal}
@@ -23,7 +23,6 @@ const Folders = ({
23
23
  rowGap,
24
24
  cardClicked,
25
25
  iconColor,
26
- headerStyles,
27
26
  ...props
28
27
  }) => {
29
28
  const [showModal, setShowModal] = useState(false);
@@ -51,6 +50,8 @@ const Folders = ({
51
50
  setShowModal(false)
52
51
  }
53
52
 
53
+ console.log(props)
54
+
54
55
  return (
55
56
  <Container>
56
57
  <Gallery
@@ -58,7 +59,6 @@ const Folders = ({
58
59
  data={folders}
59
60
  type="flat"
60
61
  cardStyle="card-style-10"
61
- headerStyles={headerStyles}
62
62
  columnsNumber={columnsNumber}
63
63
  galleryColumnGap={columnGap}
64
64
  galleryRowGap={rowGap}
@@ -68,10 +68,6 @@ const Folders = ({
68
68
  cardIconClicked={cardIconClicked}
69
69
  cardControls={cardControls}
70
70
  rowsHeight={140}
71
- customCardStyles={{
72
- cardPadding: 10,
73
- iconColor
74
- }}
75
71
  {...props} />
76
72
  <Modal
77
73
  modalIsOpen={showModal}
@@ -60,28 +60,12 @@ const Notes = ({
60
60
  data={notes}
61
61
  type='flat'
62
62
  cardStyle="card-style-11"
63
- headerStyles={{
64
- padding: 10,
65
- headerBackground: '#FE1744',
66
- titleColor: '#ffff',
67
- controlsStyles: {
68
- iconSize: 25
69
- }
70
- }}
71
- customCardStyles={{
72
- iconColor,
73
- cardTitleFontSize,
74
- cardTitleColor,
75
- cardPadding,
76
- controlsStyles: {
77
- iconColor: '#FE1744'
78
- }
79
- }}
80
63
  listControls={listControls}
81
64
  cardControls={cardControls}
82
65
  iconClicked={onIconClicked}
83
66
  cardClicked={cardClicked}
84
67
  cardIconClicked={cardIconClicked}
68
+ {...props}
85
69
  />
86
70
  <Modal
87
71
  modalIsOpen={showModal}
@@ -52,14 +52,6 @@ const ViewAlbum = ({
52
52
  <List
53
53
  listTitle="My Album"
54
54
  data={album}
55
- headerStyles={{
56
- padding: 10,
57
- headerBackground: 'black',
58
- titleColor: '#ffff',
59
- controlsStyles: {
60
- iconSize: 25
61
- }
62
- }}
63
55
  cardStyle="card-style-7"
64
56
  type="flat"
65
57
  cardClicked={(index) => props.cardClicked(index)}
@@ -74,6 +66,7 @@ const ViewAlbum = ({
74
66
  iconColor: 'black'
75
67
  }
76
68
  }}
69
+ {...props}
77
70
  />
78
71
  <Modal
79
72
  modalIsOpen={showModal}
@@ -76,25 +76,16 @@ const ViewAlbums = ({
76
76
  return (
77
77
  <Container>
78
78
  <Gallery
79
- galleryTitle="Music Albums"
79
+ galleryTitle={props.title}
80
80
  data={albums}
81
81
  type="flat"
82
82
  cardStyle="card-style-6"
83
- headerStyles={{
84
- padding: 10,
85
- headerBackground: 'black',
86
- titleColor: '#ffff',
87
- controlsStyles: {
88
- iconSize: 25
89
- }
90
- }}
91
83
  columnsNumber={3}
92
84
  galleryColumnGap={10}
93
85
  galleryRowGap={20}
94
86
  galleryControls={galleryControls}
95
87
  iconClicked={onHeaderIconClicked}
96
88
  cardControls={cardControls}
97
- cardClicked={() => null}
98
89
  cardIconClicked={cardIconClicked}
99
90
  customCardStyles={cardStyles}
100
91
  {...props}
@@ -129,6 +120,7 @@ ViewAlbums.propTypes = {
129
120
  cardBackgroundColor: PropTypes.string,
130
121
  albumTitleColor: PropTypes.string,
131
122
  descColor: PropTypes.string,
123
+ title: PropTypes.string
132
124
  };
133
125
 
134
126
  export default ViewAlbums
@@ -58,6 +58,7 @@ const Chat = ({
58
58
  }
59
59
  },
60
60
  }}
61
+ cardClicked={(path) => alert(path)}
61
62
  />
62
63
  </Left>
63
64
  <Center>
@@ -67,11 +67,17 @@ const Event = (props) => {
67
67
  date="15/11/1976 : 16/11/1976"
68
68
  disc="Lorem ipsum dolor sit amet consectetur adipisicing elit. Officia impedit fugiat reprehenderit adipisci eos atque ullam error quia amet nihil, exercitationem beatae distinctio eligendi neque, consequuntur odit commodi id porro."
69
69
  backgroundColor="black"
70
- headerBackground="black"
71
- headerTitleColor="white"
72
70
  titleColor="white"
73
71
  discColor="white"
74
72
  dateColor="white"
73
+ headerStyles={{
74
+ padding: 10,
75
+ headerBackground: 'black',
76
+ titleColor: '#ffff',
77
+ controlsStyles: {
78
+ iconSize: 25
79
+ }
80
+ }}
75
81
  />
76
82
 
77
83
  </SpaceContainer>
@@ -94,6 +94,19 @@ const Events = (props) => {
94
94
  cardTitleFontSize={15}
95
95
  onAddEvent={onAddEvent}
96
96
  cardIconClicked={cardIconClicked}
97
+ headerStyles={{
98
+ padding: 10,
99
+ headerBackground: '#FE1744',
100
+ titleColor: '#ffff',
101
+ controlsStyles: {
102
+ iconSize: 25
103
+ }
104
+ }}
105
+ customCardStyles={{
106
+ controlsStyles: {
107
+ iconColor: '#FE1744'
108
+ }
109
+ }}
97
110
  />
98
111
 
99
112
  </SpaceContainer>
@@ -102,7 +102,13 @@ const Library = (props) => {
102
102
  controlsStyles: {
103
103
  iconSize: 25
104
104
  }
105
- }} />
105
+ }}
106
+ customCardStyles={{
107
+ cardPadding: 10,
108
+ iconColor: '#ff2d2d'
109
+ }}
110
+
111
+ />
106
112
 
107
113
  </SpaceContainer>
108
114
 
@@ -20,11 +20,11 @@ import { SPACES } from '../../ViewWorld/constatnts';
20
20
  const Notes = (props) => {
21
21
 
22
22
  const [notes, setNotes] = useState([
23
- {title: 'Study notes', date: '15/11/2020'},
24
- {title: 'Music notes', date: '14/12/2020'},
25
- {title: 'Workout notes', date: '5/8/2021'},
26
- {title: 'Gaming notes', date: '14/4/2023'},
27
- {title: 'Working notes', date: '5/6/2021'},
23
+ { title: 'Study notes', date: '15/11/2020' },
24
+ { title: 'Music notes', date: '14/12/2020' },
25
+ { title: 'Workout notes', date: '5/8/2021' },
26
+ { title: 'Gaming notes', date: '14/4/2023' },
27
+ { title: 'Working notes', date: '5/6/2021' },
28
28
  ])
29
29
 
30
30
  const cardIconClicked = (action, index) => {
@@ -32,7 +32,7 @@ const Notes = (props) => {
32
32
  case 'delete':
33
33
  deleteNote(index)
34
34
  break;
35
-
35
+
36
36
  default:
37
37
  break;
38
38
  }
@@ -45,7 +45,7 @@ const Notes = (props) => {
45
45
  const deleteNote = (index) => {
46
46
  setNotes(deleteFromArrayByIndex(notes, index))
47
47
  }
48
-
48
+
49
49
  return (
50
50
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
51
51
  <Navbar />
@@ -90,10 +90,24 @@ const Notes = (props) => {
90
90
  hideTitle
91
91
  >
92
92
  <ViewNotes
93
- onAddNote={onAddNote}
94
- cardIconClicked={cardIconClicked}
95
- notes={notes}
96
- />
93
+ onAddNote={onAddNote}
94
+ cardIconClicked={cardIconClicked}
95
+ notes={notes}
96
+ headerStyles={{
97
+ padding: 10,
98
+ headerBackground: '#FE1744',
99
+ titleColor: '#ffff',
100
+ controlsStyles: {
101
+ iconSize: 25
102
+ }
103
+ }}
104
+ customCardStyles={{
105
+ iconColor: '#FE1744',
106
+ controlsStyles: {
107
+ iconColor: '#FE1744'
108
+ }
109
+ }}
110
+ />
97
111
 
98
112
  </SpaceContainer>
99
113
 
@@ -123,7 +123,15 @@ const Music = (props) => {
123
123
  album={album}
124
124
  onAddSong={onAddSong}
125
125
  cardIconClicked={cardIconClicked}
126
- cardClicked={onPlaySong} />
126
+ cardClicked={onPlaySong}
127
+ headerStyles={{
128
+ padding: 10,
129
+ headerBackground: 'black',
130
+ titleColor: '#ffff',
131
+ controlsStyles: {
132
+ iconSize: 25
133
+ }
134
+ }} />
127
135
  </SpaceContainer>
128
136
 
129
137
  </Center>
@@ -56,6 +56,10 @@ const MusicAlbums = (props) => {
56
56
  const deleteFromAlbums = (index) => {
57
57
  setAlbums(deleteFromArrayByIndex(albums, index))
58
58
  }
59
+
60
+ const cardClicked = (index, cardProps) => {
61
+ console.log(cardProps)
62
+ }
59
63
  return (
60
64
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
61
65
  <Navbar />
@@ -100,9 +104,20 @@ const MusicAlbums = (props) => {
100
104
  hideTitle
101
105
  >
102
106
  <ViewAlbums
107
+ title="Music Albums"
103
108
  albums={albums}
104
109
  cardIconClicked={cardIconClicked}
105
- onAddAlbum={onAddAlbum} />
110
+ onAddAlbum={onAddAlbum}
111
+ headerStyles={{
112
+ padding: 10,
113
+ headerBackground: 'black',
114
+ titleColor: '#ffff',
115
+ controlsStyles: {
116
+ iconSize: 25
117
+ }
118
+ }}
119
+ cardClicked={cardClicked}
120
+ />
106
121
  </SpaceContainer>
107
122
 
108
123
  </Center>
@@ -59,6 +59,10 @@ const Albums = (props) => {
59
59
  setAlbums(addObjectToArray(albums, newAlbum))
60
60
  }
61
61
 
62
+ const cardClicked = (index, cardProps) => {
63
+ console.log(cardProps)
64
+ }
65
+
62
66
  return (
63
67
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
64
68
  <Navbar />
@@ -108,6 +112,7 @@ const Albums = (props) => {
108
112
  onDeleteAlbum={onDeleteAlbum}
109
113
  onAddAlbum={onAddAlbum}
110
114
  columnsNumber={2}
115
+ cardClicked={cardClicked}
111
116
  />
112
117
  </SpaceContainer>
113
118
 
@@ -76,7 +76,8 @@ const DetailedVideo = (props) => {
76
76
  date="10/11/2022"
77
77
  comments={comments}
78
78
  discColor="gray"
79
- dateColor="gray" />
79
+ dateColor="gray"
80
+ videoSrc={'https://www.youtube.com/watch?v=vETUpJ88cfA'} />
80
81
  </SpaceContainer>
81
82
 
82
83
  </Center>
@@ -84,6 +84,9 @@ const Video = (props) => {
84
84
  setAlbum(deleteFromArrayByIndex(album, index))
85
85
  }
86
86
 
87
+ const cardClicked = (index, cardProps) => {
88
+ console.log(cardProps)
89
+ }
87
90
 
88
91
  return (
89
92
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
@@ -132,7 +135,16 @@ const Video = (props) => {
132
135
  album={album}
133
136
  onAddVideo={onAddVideo}
134
137
  onDeleteSong={deleteVideoFromAlbum}
135
- cardIconClicked={cardIconClicked} />
138
+ cardIconClicked={cardIconClicked}
139
+ cardClicked={cardClicked}
140
+ headerStyles={{
141
+ padding: 10,
142
+ headerBackground: 'black',
143
+ titleColor: '#ffff',
144
+ controlsStyles: {
145
+ iconSize: 25
146
+ }
147
+ }} />
136
148
  </SpaceContainer>
137
149
 
138
150
  </Center>
@@ -2,15 +2,15 @@ export const SPACES = [
2
2
  {
3
3
  title: 'Main List',
4
4
  data: [
5
- {title: 'Cargo Sprint'},
6
- {title: 'Movies'}
7
- ]
5
+ {title: 'Cargo Sprint', path: 'cago'},
6
+ {title: 'Movies', path: 'movies'}
7
+ ],
8
8
  },
9
9
  {
10
- title: 'Entertainment List',
10
+ title: 'Entertainment',
11
11
  data: [
12
- {title: 'Gaming'},
13
- {title: 'Music'}
12
+ {title: 'Gaming', path: 'games'},
13
+ {title: 'Music', path: 'music'}
14
14
  ]
15
15
  }
16
16
  ]
@@ -93,7 +93,6 @@ const ViewAlbums = ({
93
93
  galleryRowGap={rowGap}
94
94
  galleryControls={galleryControls}
95
95
  iconClicked={onIconClicked}
96
- cardClicked={() => null}
97
96
  cardControls={cardControls}
98
97
  cardIconClicked={cardIconClicked}
99
98
  customCardStyles={cardStyles}
@@ -5,16 +5,20 @@ import PropTypes from "prop-types";
5
5
  import Controls from '../../Controls/Controls';
6
6
  import { globalContent, MainCard, Title, Description } from '../globalCardStyles';
7
7
 
8
- const CardStyle3 = ({ title, description, ...props }) => {
8
+ const CardStyle3 = ({ title, description, path, ...props }) => {
9
9
  const [showIcons, setShowIcons] = useState(false)
10
10
 
11
11
  const iconCliked = (action) => {
12
12
  console.log(action)
13
13
  }
14
14
 
15
+ const cardClicked = () => {
16
+ props.cardClicked(path)
17
+ }
15
18
 
16
19
  return (
17
20
  <MainCard
21
+ onClick={cardClicked}
18
22
  onMouseEnter={e => setShowIcons(true)}
19
23
  onMouseLeave={e => setShowIcons(false)}
20
24
  {...props}>
@@ -14,8 +14,8 @@ const Gallery = ({ data, cardStyle, customCardStyles, type, cardControls = null,
14
14
  props.iconClicked(action)
15
15
  }
16
16
 
17
- const clicked = (index) => {
18
- props.cardClicked(index)
17
+ const clicked = (index, cardProps) => {
18
+ props.cardClicked(index, cardProps)
19
19
  }
20
20
 
21
21
  const cardIconClicked = (action, index) => {
@@ -13,7 +13,12 @@ const WidgetContainer = ({
13
13
  ...props
14
14
  }) => {
15
15
 
16
- const child = getWidgetType(widgetType, widgetProps)
16
+ const cardClicked = (path) => {
17
+ props.cardClicked(path)
18
+ }
19
+
20
+ const child = getWidgetType(widgetType, widgetProps, cardClicked)
21
+
17
22
 
18
23
  const iconCliked = (action) => {
19
24
  console.log(action)
@@ -39,6 +44,7 @@ const WidgetContainer = ({
39
44
  const Container = styled.div`
40
45
  display: flex;
41
46
  flex-direction: column;
47
+ width: 100%;
42
48
  `
43
49
 
44
50
  const Body = styled.div`
@@ -7,6 +7,7 @@ import Comments from '../Comments/Comments';
7
7
  import RichTextInput from '../../Common Inputs/RichTextInput/RichTextInput';
8
8
 
9
9
  const VideoSpace = ({
10
+ videoSrc,
10
11
  title,
11
12
  discription,
12
13
  date,
@@ -29,7 +30,8 @@ const VideoSpace = ({
29
30
  return (
30
31
  <Container backgroundColor={backgroundColor}>
31
32
  <VideoPlayer
32
- iconsColor={iconsColor} />
33
+ iconsColor={iconsColor}
34
+ src={videoSrc} />
33
35
  <VideoDetails detailsPadding={detailsPadding}>
34
36
  <Top>
35
37
  <Title titleFontSize={titleFontSize} titleColor={titleColor}>{title}</Title>
@@ -79,21 +79,12 @@ const ViewAlbum = ({
79
79
  data={album}
80
80
  type="flat"
81
81
  cardStyle="card-style-6"
82
- headerStyles={{
83
- padding: 10,
84
- headerBackground: 'black',
85
- titleColor: '#ffff',
86
- controlsStyles: {
87
- iconSize: 25
88
- }
89
- }}
90
82
  columnsNumber={3}
91
83
  galleryColumnGap={10}
92
84
  galleryRowGap={20}
93
85
  galleryControls={galleryControls}
94
86
  iconClicked={onHeaderIconClicked}
95
87
  cardControls={cardControls}
96
- cardClicked={() => null}
97
88
  cardIconClicked={cardIconClicked}
98
89
  customCardStyles={cardStyles}
99
90
  {...props}
@@ -44,9 +44,9 @@ export const getCardStyle = (cardProps, cardType, customCardStyles, cardControls
44
44
  const cardTypes = {
45
45
  'card-style-1': (<CardStyle1 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} />),
46
46
  'card-style-2': (<CardStyle2 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls}/>),
47
- 'card-style-3': (<CardStyle3 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls}/>),
47
+ 'card-style-3': (<CardStyle3 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={(path) => clicked(path)}/>),
48
48
  'card-style-4': (<CardStyle4 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls}/>),
49
- 'card-style-6': (<CardStyle6 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
49
+ 'card-style-6': (<CardStyle6 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index, cardProps)} iconClicked={(action) => cardIconClicked(action, index)} />),
50
50
  'card-style-7': (<CardStyle7 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
51
51
  'card-style-8': (<CardStyle8 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
52
52
  'card-style-9': (<CardStyle9 key={index} {...cardProps} {...customCardStyles} cardControls={cardControls} cardClicked={() => clicked(index)} iconClicked={(action) => cardIconClicked(action, index)} />),
@@ -56,9 +56,9 @@ export const getCardStyle = (cardProps, cardType, customCardStyles, cardControls
56
56
  return cardTypes[cardType]
57
57
  };
58
58
 
59
- export const getWidgetType = (widgetType, props) => {
59
+ export const getWidgetType = (widgetType, props, cardClicked) => {
60
60
  const widgetTypes = {
61
- 'list': (<ReusableList {...props}/>),
61
+ 'list': (<ReusableList cardClicked={(path) => cardClicked(path)} {...props}/>),
62
62
  'music player': (<MusicPlayerWidget {...props} />),
63
63
  'logo': (<LogoWidget {...props}/>),
64
64
  'video player': (<VideoPlayer {...props}/>)