@mohamed-karawia/library 0.1.11 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +3 -3
- package/dist/stories/Events/Event/Event.js +5 -9
- package/dist/stories/Events/EventsList/EventsList.js +2 -19
- package/dist/stories/Library/Folders/Folders.js +3 -8
- package/dist/stories/Library/Notes/Notes.js +2 -19
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +2 -10
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +1 -12
- package/dist/stories/Pages/Chat/Chat.js +3 -0
- package/dist/stories/Pages/Enrollment/Forms/Forms.js +6 -1
- package/dist/stories/Pages/Events/Event/Event.js +9 -3
- package/dist/stories/Pages/Events/Events/Events.js +19 -1
- package/dist/stories/Pages/Library/Folders/Library.js +4 -0
- package/dist/stories/Pages/Library/Notes/Notes.js +20 -1
- package/dist/stories/Pages/Music/MusicAlbum/Music.js +9 -1
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +15 -1
- package/dist/stories/Pages/Photos/Albums/Albums.js +6 -1
- package/dist/stories/Pages/Video/DetailedVideo/DetailedVideo.js +2 -1
- package/dist/stories/Pages/Video/VideoAlbum/Video.js +14 -1
- package/dist/stories/Pages/ViewWorld/constatnts.js +9 -5
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +0 -3
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +7 -1
- package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +7 -1
- package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +5 -1
- package/dist/stories/Reusable Components/Gallery/Gallery.js +2 -2
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +2 -2
- package/dist/stories/Reusable Components/WidgetContainer/WidgetContainer.js +7 -2
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +5 -3
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +0 -11
- package/dist/stories/helpers/util.js +13 -6
- package/package.json +4 -4
- package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +2 -1
- package/src/stories/Events/Event/Event.jsx +3 -6
- package/src/stories/Events/EventsList/EventsList.jsx +1 -17
- package/src/stories/Library/Folders/Folders.jsx +2 -6
- package/src/stories/Library/Notes/Notes.jsx +1 -17
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +1 -8
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +2 -10
- package/src/stories/Pages/Chat/Chat.jsx +1 -0
- package/src/stories/Pages/Enrollment/Forms/Forms.jsx +7 -1
- package/src/stories/Pages/Events/Event/Event.jsx +8 -2
- package/src/stories/Pages/Events/Events/Events.jsx +18 -0
- package/src/stories/Pages/Library/Folders/Library.jsx +7 -1
- package/src/stories/Pages/Library/Notes/Notes.jsx +30 -11
- package/src/stories/Pages/Music/MusicAlbum/Music.jsx +9 -1
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +16 -1
- package/src/stories/Pages/Photos/Albums/Albums.jsx +5 -0
- package/src/stories/Pages/Video/DetailedVideo/DetailedVideo.jsx +2 -1
- package/src/stories/Pages/Video/VideoAlbum/Video.jsx +13 -1
- package/src/stories/Pages/ViewWorld/constatnts.js +6 -6
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +0 -1
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -0
- package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -1
- package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +3 -1
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +2 -2
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +2 -2
- package/src/stories/Reusable Components/WidgetContainer/WidgetContainer.jsx +7 -1
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +3 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +0 -9
- package/src/stories/helpers/util.js +6 -6
@@ -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);
|
@@ -133,7 +136,7 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
|
|
133
136
|
}, cardProps, customCardStyles, {
|
134
137
|
cardControls: cardControls,
|
135
138
|
cardClicked: function cardClicked() {
|
136
|
-
return clicked(index);
|
139
|
+
return clicked(index, cardProps);
|
137
140
|
},
|
138
141
|
iconClicked: function iconClicked(action) {
|
139
142
|
return cardIconClicked(action, index);
|
@@ -155,7 +158,7 @@ var getCardStyle = function getCardStyle(cardProps, cardType, customCardStyles,
|
|
155
158
|
}, cardProps, customCardStyles, {
|
156
159
|
cardControls: cardControls,
|
157
160
|
cardClicked: function cardClicked() {
|
158
|
-
return clicked(index);
|
161
|
+
return clicked(index, cardProps);
|
159
162
|
},
|
160
163
|
iconClicked: function iconClicked(action) {
|
161
164
|
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,
|
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,14 +10,16 @@
|
|
10
10
|
]
|
11
11
|
]
|
12
12
|
},
|
13
|
-
"version": "0.1.
|
13
|
+
"version": "0.1.15",
|
14
14
|
"private": false,
|
15
15
|
"dependencies": {
|
16
16
|
"@babel/cli": "^7.16.7",
|
17
17
|
"@babel/runtime": "^7.15.4",
|
18
|
+
"@editorjs/editorjs": "^2.22.2",
|
18
19
|
"@editorjs/header": "^2.6.1",
|
19
20
|
"@editorjs/image": "^2.6.2",
|
20
21
|
"@editorjs/marker": "^1.2.2",
|
22
|
+
"@editorjs/paragraph": "^2.8.0",
|
21
23
|
"@editorjs/table": "^2.0.1",
|
22
24
|
"@giphy/js-fetch-api": "^4.1.2",
|
23
25
|
"@giphy/react-components": "^5.3.1",
|
@@ -66,7 +68,7 @@
|
|
66
68
|
"build": "cross-env BABEL_ENV=production babel src -d dist",
|
67
69
|
"test": "react-scripts test",
|
68
70
|
"eject": "react-scripts eject",
|
69
|
-
"storybook": "start-storybook -p 6006 -s public",
|
71
|
+
"storybook": "export NODE_OPTIONS=--openssl-legacy-provider; start-storybook -p 6006 -s public",
|
70
72
|
"build-storybook": "build-storybook -s public"
|
71
73
|
},
|
72
74
|
"eslintConfig": {
|
@@ -98,8 +100,6 @@
|
|
98
100
|
]
|
99
101
|
},
|
100
102
|
"devDependencies": {
|
101
|
-
"@editorjs/editorjs": "^2.22.2",
|
102
|
-
"@editorjs/paragraph": "^2.8.0",
|
103
103
|
"@editorjs/simple-image": "^1.4.1",
|
104
104
|
"@geometricpanda/storybook-addon-badges": "^0.0.4",
|
105
105
|
"@storybook/addon-a11y": "^6.3.8",
|
@@ -8,7 +8,7 @@ const ViewForms = ({
|
|
8
8
|
}) => {
|
9
9
|
return (
|
10
10
|
<List
|
11
|
-
listTitle="Submitted
|
11
|
+
listTitle="Submitted Forms"
|
12
12
|
data={data}
|
13
13
|
cardStyle="card-style-9"
|
14
14
|
type="sectioned"
|
@@ -27,6 +27,7 @@ const ViewForms = ({
|
|
27
27
|
dropdownItemHoverColor: '#FE1744'
|
28
28
|
},
|
29
29
|
}}
|
30
|
+
{...props}
|
30
31
|
/>
|
31
32
|
)
|
32
33
|
}
|
@@ -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=
|
27
|
-
|
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=
|
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
|
@@ -69,6 +69,10 @@ const Forms = (props) => {
|
|
69
69
|
},
|
70
70
|
])
|
71
71
|
|
72
|
+
const cardClicked = (index, cardProps) => {
|
73
|
+
console.log(cardProps)
|
74
|
+
}
|
75
|
+
|
72
76
|
return (
|
73
77
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
74
78
|
<Navbar />
|
@@ -113,7 +117,9 @@ const Forms = (props) => {
|
|
113
117
|
hideTitle
|
114
118
|
>
|
115
119
|
<ViewForms
|
116
|
-
data={forms}
|
120
|
+
data={forms}
|
121
|
+
cardClicked={cardClicked}
|
122
|
+
/>
|
117
123
|
|
118
124
|
</SpaceContainer>
|
119
125
|
|
@@ -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>
|
@@ -45,6 +45,10 @@ const Events = (props) => {
|
|
45
45
|
setEvents(deleteFromArrayByIndex(events, index))
|
46
46
|
}
|
47
47
|
|
48
|
+
const cardClicked = (index, cardProps) => {
|
49
|
+
console.log(cardProps)
|
50
|
+
}
|
51
|
+
|
48
52
|
return (
|
49
53
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
50
54
|
<Navbar />
|
@@ -94,6 +98,20 @@ const Events = (props) => {
|
|
94
98
|
cardTitleFontSize={15}
|
95
99
|
onAddEvent={onAddEvent}
|
96
100
|
cardIconClicked={cardIconClicked}
|
101
|
+
cardClicked={cardClicked}
|
102
|
+
headerStyles={{
|
103
|
+
padding: 10,
|
104
|
+
headerBackground: '#FE1744',
|
105
|
+
titleColor: '#ffff',
|
106
|
+
controlsStyles: {
|
107
|
+
iconSize: 25
|
108
|
+
}
|
109
|
+
}}
|
110
|
+
customCardStyles={{
|
111
|
+
controlsStyles: {
|
112
|
+
iconColor: '#FE1744'
|
113
|
+
}
|
114
|
+
}}
|
97
115
|
/>
|
98
116
|
|
99
117
|
</SpaceContainer>
|
@@ -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,11 @@ const Notes = (props) => {
|
|
45
45
|
const deleteNote = (index) => {
|
46
46
|
setNotes(deleteFromArrayByIndex(notes, index))
|
47
47
|
}
|
48
|
-
|
48
|
+
|
49
|
+
const cardClicked = (index, cardProps) => {
|
50
|
+
console.log(cardProps)
|
51
|
+
}
|
52
|
+
|
49
53
|
return (
|
50
54
|
<BaseMaterial {...worldStyles.containerStyle} {...props}>
|
51
55
|
<Navbar />
|
@@ -90,10 +94,25 @@ const Notes = (props) => {
|
|
90
94
|
hideTitle
|
91
95
|
>
|
92
96
|
<ViewNotes
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
+
onAddNote={onAddNote}
|
98
|
+
cardIconClicked={cardIconClicked}
|
99
|
+
notes={notes}
|
100
|
+
cardClicked={cardClicked}
|
101
|
+
headerStyles={{
|
102
|
+
padding: 10,
|
103
|
+
headerBackground: '#FE1744',
|
104
|
+
titleColor: '#ffff',
|
105
|
+
controlsStyles: {
|
106
|
+
iconSize: 25
|
107
|
+
}
|
108
|
+
}}
|
109
|
+
customCardStyles={{
|
110
|
+
iconColor: '#FE1744',
|
111
|
+
controlsStyles: {
|
112
|
+
iconColor: '#FE1744'
|
113
|
+
}
|
114
|
+
}}
|
115
|
+
/>
|
97
116
|
|
98
117
|
</SpaceContainer>
|
99
118
|
|
@@ -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
|
|
@@ -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
|
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
|
]
|
@@ -15,8 +15,13 @@ const CardStyle11 = ({ title, date, ...props }) => {
|
|
15
15
|
props.iconClicked(action, props.index)
|
16
16
|
}
|
17
17
|
|
18
|
+
const cardClicked = () => {
|
19
|
+
props.cardClicked()
|
20
|
+
}
|
21
|
+
|
18
22
|
return (
|
19
23
|
<Card
|
24
|
+
onClick={cardClicked}
|
20
25
|
{...props}>
|
21
26
|
<SvgWrapper {...props}>
|
22
27
|
<BiNotepad />
|
@@ -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}>
|