@mohamed-karawia/library 0.1.17 → 0.1.21

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. package/dist/stories/Chat/Chat.js +129 -14
  2. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  3. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  4. package/dist/stories/Community/Community.js +137 -0
  5. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +10 -12
  6. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -1
  7. package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
  8. package/dist/stories/Events/Event/Event.js +116 -5
  9. package/dist/stories/Events/EventsList/EventsList.js +94 -19
  10. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  11. package/dist/stories/Library/Folders/Folders.js +77 -5
  12. package/dist/stories/Library/Notes/Notes.js +78 -4
  13. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  14. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +137 -15
  15. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +67 -28
  16. package/dist/stories/Navbar/Navbar.js +1 -1
  17. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +8 -0
  18. package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
  19. package/dist/stories/Pages/Enrollment/Forms/Forms.js +3 -1
  20. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  21. package/dist/stories/Pages/Events/Events/Events.js +1 -0
  22. package/dist/stories/Pages/Music/MusicAlbum/Music.js +8 -6
  23. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  24. package/dist/stories/Pages/Photos/Albums/Albums.js +4 -1
  25. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -19
  26. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +83 -25
  27. package/dist/stories/Preview/Preview.js +37 -0
  28. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  29. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  30. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  31. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  32. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  33. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  34. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  35. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  36. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  37. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  38. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  39. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  40. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  41. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  42. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  43. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  44. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  45. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  46. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  47. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  48. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  49. package/dist/stories/Reusable Components/Community/Community.js +75 -0
  50. package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
  51. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  52. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
  53. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  54. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  55. package/dist/stories/Sections/Sections.js +8 -2
  56. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  57. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  58. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
  59. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
  60. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  61. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  62. package/dist/stories/helpers/util.js +60 -3
  63. package/dist/stories/store/communities.js +943 -0
  64. package/dist/stories/store/store.js +44 -0
  65. package/package.json +5 -2
  66. package/src/stories/Chat/Chat.jsx +109 -13
  67. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  68. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  69. package/src/stories/Community/Community.jsx +110 -0
  70. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +7 -9
  71. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -2
  72. package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
  73. package/src/stories/Events/Event/Event.jsx +98 -5
  74. package/src/stories/Events/EventsList/EventsList.jsx +101 -22
  75. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  76. package/src/stories/Library/Folders/Folders.jsx +81 -5
  77. package/src/stories/Library/Notes/Notes.jsx +65 -5
  78. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  79. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -14
  80. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +61 -32
  81. package/src/stories/Navbar/Navbar.jsx +1 -1
  82. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +10 -1
  83. package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
  84. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +3 -1
  85. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  86. package/src/stories/Pages/Events/Events/Events.jsx +75 -74
  87. package/src/stories/Pages/Library/Folders/Library.jsx +1 -1
  88. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +8 -6
  89. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  90. package/src/stories/Pages/Photos/Albums/Albums.jsx +3 -0
  91. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -13
  92. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +66 -33
  93. package/src/stories/Preview/Preview.jsx +35 -0
  94. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  95. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  96. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  97. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  98. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  99. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  100. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  101. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  102. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  103. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  104. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  105. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  106. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  107. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  108. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  109. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  110. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  111. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  112. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  113. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  114. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  115. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  116. package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
  117. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  118. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
  119. package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
  120. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  121. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  122. package/src/stories/Sections/Sections.jsx +5 -2
  123. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  124. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  125. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
  126. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
  127. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  128. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  129. package/src/stories/helpers/util.js +42 -2
  130. package/src/stories/store/communities.js +705 -0
  131. package/src/stories/store/store.js +33 -0
  132. package/src/stories/styling.json +92 -0
@@ -1,4 +1,4 @@
1
- import React, { useState } from 'react';
1
+ import React, { useState, useEffect } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
 
@@ -6,10 +6,19 @@ import List from '../../Reusable Components/ReusableList/ReusableList';
6
6
  import Modal from '../../Reusable Components/ReactModal/ReactModal';
7
7
 
8
8
  import { AiOutlineFileAdd, AiOutlineDelete } from "react-icons/ai";
9
+ import { BsGear } from "react-icons/bs";
9
10
  import AddSong from '../../Forms/AddSong/AddSong';
11
+ import Tabs from '../../Reusable Components/Tabs/Tabs';
12
+ import Sections from '../../Sections/Sections';
13
+ import MusicAlbumPreview from '../../PreviewComponents/MusicAlbumPreview/MusicAlbumPreview';
14
+ import WidgetContainer from "../../Reusable Components/WidgetContainer/WidgetContainer";
15
+ import Community from '../../Reusable Components/Community/Community';
16
+ import { SPACES } from '../../Pages/ViewWorld/constatnts';
17
+ // import styles from '../../styling.json'
10
18
 
11
19
  const listControls = [
12
20
  { icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Album' },
21
+ { icon: (<BsGear />), action: 'config', name: 'Config' },
13
22
  ]
14
23
 
15
24
  const cardControls = [
@@ -21,21 +30,55 @@ const ViewAlbum = ({
21
30
  cardBackgroundColor,
22
31
  songTitleColor,
23
32
  ...props }) => {
24
- const [showModal, setShowModal] = useState(false)
33
+ const [showModal, setShowModal] = useState(false);
34
+ const [showConfigModal, setShowConfigModal] = useState(false);
35
+ const [centerContext, setCenterContext] = useState(<ViewAlbum album={album}/>)
25
36
 
26
- const onIconClicked = (action) => {
27
- switch (action) {
28
- case 'add':
29
- setShowModal(true)
30
- break;
37
+ const formChanged = (values) => {
38
+ console.log('context changed')
39
+ setCenterContext(<ViewAlbum album={album} {...values} />)
40
+ }
31
41
 
32
- default:
33
- break;
42
+
43
+ let tabs = [
44
+ {
45
+ title: 'New', id: 'preview'
46
+ },
47
+ {
48
+ title: 'Context', id: 'community'
49
+ }
50
+ ]
51
+ let sections = [
52
+ {
53
+ title: 'Styles',
54
+ data: [
55
+ {
56
+ title: 'Styling',
57
+ id: 'styling'
58
+ }
59
+ ]
60
+ }
61
+ ]
62
+
63
+ const onIconClicked = (action) => {
64
+ if (!props.preview) {
65
+ switch (action) {
66
+ case 'add':
67
+ setShowModal(true)
68
+ break;
69
+ case 'config':
70
+ setShowConfigModal(true)
71
+ break;
72
+ default:
73
+ break;
74
+ }
34
75
  }
35
76
  }
36
77
 
37
78
  const cardIconClicked = (action, index) => {
38
- props.cardIconClicked(action, index)
79
+ if (!props.preview) {
80
+ props.cardIconClicked(action, index)
81
+ }
39
82
  }
40
83
 
41
84
  const onAddSong = (song) => {
@@ -50,7 +93,7 @@ const ViewAlbum = ({
50
93
  return (
51
94
  <Container>
52
95
  <List
53
- listTitle="My Album"
96
+ listTitle={props.title || "My Album"}
54
97
  data={album}
55
98
  cardStyle="card-style-7"
56
99
  type="flat"
@@ -70,8 +113,78 @@ const ViewAlbum = ({
70
113
  <AddSong
71
114
  saveHandler={onAddSong}
72
115
  cancelHandler={cancelHandler}
73
- saveBtnText="Create"
74
- cancelBtnText="Cancel" />
116
+ saveBtnText={props.saveBtnText || "Create"}
117
+ cancelBtnText={props.cancelBtnText || "Cancel"} />
118
+ </Modal>
119
+ <Modal
120
+ modalIsOpen={showConfigModal}
121
+ closeModal={() => {
122
+ localStorage.removeItem('formStyles')
123
+ setShowConfigModal(false)
124
+ }}
125
+ exitModalButton={(e) => (
126
+ <div></div>
127
+ )}
128
+ >
129
+ <Sections
130
+ sections={sections}
131
+ backgroundColor={'white'}
132
+ sectionHeaderStyles={{
133
+ titleColor: 'white',
134
+ headerBackground: 'transparent'
135
+ }}
136
+ customCardStyles={{
137
+ cardPadding: 6,
138
+ cardTitleFontSize: 15,
139
+ cardBackgroundColor: '#2c2c2c',
140
+ cardTitleColor: 'white',
141
+ onHoverBackgroundColor: '#555555',
142
+ controlsStyles: {
143
+ showOnHover: true,
144
+ }
145
+ }}>
146
+ <Tabs
147
+ title="Music Album Config"
148
+ tabs={tabs}
149
+ id='styling'
150
+ >
151
+ <MusicAlbumPreview
152
+ componentProps={{ album, title: props.title || "My Album", preview: true }}
153
+ formChanged={formChanged}
154
+ id="preview"
155
+ />
156
+ <Community
157
+ right={(
158
+ <WidgetContainer
159
+ widgetType='music player'
160
+ widgetProps={{
161
+ playlist: album,
162
+ currentSong: 1,
163
+ }}
164
+ />
165
+ )}
166
+ left={
167
+ (
168
+ <WidgetContainer
169
+ widgetType='spaces-list'
170
+ widgetProps={{
171
+ listTitle: 'Your Spaces',
172
+ type: 'sectioned',
173
+ spaces: SPACES,
174
+ cardStyle: 'card-style-3',
175
+ cardClicked: () => alert('clicked'),
176
+ // headerStyles: styles.widgetContainer.header,
177
+ // sectionHeaderStyles: styles.widgetContainer.body.sectionHeaderStyles,
178
+ // customCardStyles: styles.widgetContainer.body.customCardStyles,
179
+ }}
180
+ />
181
+ )
182
+ }
183
+ center={centerContext}
184
+ id="community" />
185
+ </Tabs>
186
+
187
+ </Sections>
75
188
  </Modal>
76
189
  </Container>
77
190
  )
@@ -82,7 +195,7 @@ const Container = styled.div`
82
195
  `
83
196
 
84
197
  ViewAlbum.defaultProps = {
85
- cardBackgroundColor: 'white',
198
+
86
199
  };
87
200
 
88
201
  ViewAlbum.propTypes = {
@@ -92,6 +205,12 @@ ViewAlbum.propTypes = {
92
205
  cardClicked: PropTypes.func,
93
206
  cardBackgroundColor: PropTypes.string,
94
207
  songTitleColor: PropTypes.string,
208
+ title: PropTypes.string,
209
+ saveBtnText: PropTypes.string,
210
+ cancelBtnText: PropTypes.string,
211
+ headerStyles: PropTypes.object,
212
+ customCardStyles: PropTypes.object,
213
+ preview: PropTypes.bool
95
214
  };
96
215
 
97
216
  export default ViewAlbum
@@ -5,11 +5,12 @@ import styled from 'styled-components';
5
5
  import Gallery from '../../Reusable Components/Gallery/Gallery';
6
6
  import Modal from '../../Reusable Components/ReactModal/ReactModal';
7
7
  import CreateAlbum from '../../Forms/CreateMusicAlbum/CreateMusicAlbum';
8
+ import Tabs from '../../Reusable Components/Tabs/Tabs';
9
+ import Sections from '../../Sections/Sections';
10
+ import MusicAlbumsPreview from '../../PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview';
8
11
 
9
12
  import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
10
-
11
-
12
-
13
+ import { BsGear } from "react-icons/bs";
13
14
 
14
15
  const cardControls = [
15
16
  { icon: (<AiFillDelete />), action: 'delete', name: 'Delete album' },
@@ -17,6 +18,7 @@ const cardControls = [
17
18
 
18
19
  const galleryControls = [
19
20
  { icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Album' },
21
+ { icon: (<BsGear />), action: 'config', name: 'Config' },
20
22
  ]
21
23
 
22
24
  const ViewAlbums = ({
@@ -25,33 +27,40 @@ const ViewAlbums = ({
25
27
  descColor,
26
28
  ...props
27
29
  }) => {
28
- const cardStyles = {
29
- darkOnHover: true,
30
- cardTitleColor: albumTitleColor,
31
- descColor,
32
- controlsStyles: {
33
- showOnHover: true,
34
- position: 'center',
35
- iconBackground: "#272727",
36
- dropdownBackground: "#272727",
37
- dropdownFontColor: "white",
38
- dropdownItemHoverColor: "#414141",
39
- iconBackgroundHover: "#414141",
40
- iconBorderRadius: 100,
41
- iconSize: 25,
42
- iconsGap: 10,
43
- iconColor: 'white',
44
- containerPadding: 20
45
- }
46
- }
47
30
 
48
31
  const [showModal, setShowModal] = useState(false);
32
+ const [showConfigModal, setShowConfigModal] = useState(false);
33
+
34
+ const tabs = [
35
+ {
36
+ title: 'New', component: (<MusicAlbumsPreview
37
+ componentProps={{ albums, title: props.title || 'Music Albums' }}
38
+ />)
39
+ }
40
+ ]
41
+
42
+ const sections = [
43
+ {
44
+ title: 'Styles',
45
+ data: [
46
+ {
47
+ title: 'Styling', component: (<Tabs
48
+ title="Music Albums Config"
49
+ tabs={tabs}
50
+ />)
51
+ }
52
+ ]
53
+ }
54
+ ]
49
55
 
50
56
  const onHeaderIconClicked = (action) => {
51
57
  switch (action) {
52
58
  case 'add':
53
59
  setShowModal(true)
54
60
  break;
61
+ case 'config':
62
+ setShowConfigModal(true)
63
+ break;
55
64
  default:
56
65
  break;
57
66
  }
@@ -74,13 +83,10 @@ const ViewAlbums = ({
74
83
  return (
75
84
  <Container>
76
85
  <Gallery
77
- galleryTitle={props.title}
86
+ galleryTitle={props.title || 'Music Albums'}
78
87
  data={albums}
79
88
  type="flat"
80
89
  cardStyle="card-style-6"
81
- columnsNumber={3}
82
- galleryColumnGap={10}
83
- galleryRowGap={20}
84
90
  galleryControls={galleryControls}
85
91
  iconClicked={onHeaderIconClicked}
86
92
  cardControls={cardControls}
@@ -96,8 +102,30 @@ const ViewAlbums = ({
96
102
  <CreateAlbum
97
103
  saveHandler={onAddAlbum}
98
104
  cancelHandler={cancelHandler}
99
- saveBtnText="Create"
100
- cancelBtnText="Cancel" />
105
+ saveBtnText={props.saveBtnText || "Create"}
106
+ cancelBtnText={props.cancelBtnText || "Cancel"} />
107
+ </Modal>
108
+ <Modal
109
+ modalIsOpen={showConfigModal}
110
+ closeModal={() => setShowConfigModal(false)}
111
+ exitModalButton={(e) => (
112
+ <div></div>
113
+ )}
114
+ >
115
+ <Sections
116
+ sections={sections}
117
+ backgroundColor={'white'}
118
+ sectionHeaderStyles={{
119
+ titleColor: 'white',
120
+ headerBackground: 'transparent'
121
+ }}
122
+ customCardStyles={{
123
+ cardPadding: 6,
124
+ cardTitleFontSize: 15,
125
+ cardBackgroundColor: '#2c2c2c',
126
+ cardTitleColor: 'white',
127
+ onHoverBackgroundColor: '#555555',
128
+ }} />
101
129
  </Modal>
102
130
  </Container>
103
131
  )
@@ -106,9 +134,7 @@ const Container = styled.div`
106
134
  width: 100%;
107
135
  `
108
136
 
109
- ViewAlbums.defaultProps = {
110
- cardBackgroundColor: 'white'
111
- };
137
+ ViewAlbums.defaultProps = {};
112
138
 
113
139
  ViewAlbums.propTypes = {
114
140
  albums: PropTypes.array,
@@ -117,7 +143,10 @@ ViewAlbums.propTypes = {
117
143
  cardBackgroundColor: PropTypes.string,
118
144
  albumTitleColor: PropTypes.string,
119
145
  descColor: PropTypes.string,
120
- title: PropTypes.string
146
+ title: PropTypes.string,
147
+ saveBtnText: PropTypes.string,
148
+ cancelBtnText: PropTypes.string,
149
+ preview: PropTypes.bool
121
150
  };
122
151
 
123
152
  export default ViewAlbums
@@ -205,7 +205,7 @@ const NavBar = styled.div`
205
205
  `;
206
206
 
207
207
  const UniverseContainer = styled('div')({
208
- width: '346px',
208
+ width: '100%',
209
209
  height: '72px',
210
210
  display: 'flex',
211
211
  'align-items': 'center',
@@ -96,7 +96,16 @@ const DetailedForm = (props) => {
96
96
  dropdownFontColor: 'white',
97
97
  dropdownItemHoverColor: '#FE1744'
98
98
  },
99
- }} />
99
+ }}
100
+ userHeaderStyles={{
101
+ cardBackgroundColor: '#FE1744',
102
+ cardImageRadius: "100",
103
+ cardTitleColor: 'white',
104
+ }}
105
+ customCardStyles={{
106
+ cardPadding: 10,
107
+ }}
108
+ />
100
109
 
101
110
  </SpaceContainer>
102
111
 
@@ -77,9 +77,15 @@ const FillForm = (props) => {
77
77
  hideTitle
78
78
  >
79
79
  <Form
80
+ formTitle="Community Form"
80
81
  sections={sections}
81
82
  saveBtnText={'Submit'}
82
83
  cancelBtnText="Cancel"
84
+ headerStyles={{
85
+ padding: 10,
86
+ headerBackground: 'black',
87
+ titleColor: '#ffff',
88
+ }}
83
89
  />
84
90
 
85
91
  </SpaceContainer>
@@ -116,7 +116,6 @@ const Forms = (props) => {
116
116
  </Left>
117
117
  <Center>
118
118
  <SpaceContainer
119
- title="Music Album"
120
119
  discription="Lorem ipsum dolor sit amet consectetur."
121
120
  hideTitle
122
121
  >
@@ -138,6 +137,9 @@ const Forms = (props) => {
138
137
  cardTitleColor: 'white',
139
138
  cardBackgroundColor: 'black',
140
139
  cardPadding: 10
140
+ }}
141
+ customCardStyles={{
142
+ cardBackgroundColor: 'white'
141
143
  }}
142
144
  />
143
145
 
@@ -11,7 +11,6 @@ import BaseMaterial from '../../../Containers/BaseMaterial';
11
11
  import SpaceContainer from "../../../Reusable Components/SpaceContainer/SpaceContainer";
12
12
  import WidgetContainer from "../../../Reusable Components/WidgetContainer/WidgetContainer";
13
13
  import DetailedEvent from '../../../Events/Event/Event';
14
- import { addObjectToArray, deleteFromArrayByIndex } from '../../../helpers/util';
15
14
 
16
15
  import worldStyles from '../../ViewWorld/styles.json';
17
16
 
@@ -30,16 +29,25 @@ const Event = (props) => {
30
29
  }}
31
30
  />
32
31
  <WidgetContainer
33
- widgetType='list'
32
+ widgetType='spaces-list'
34
33
  widgetProps={{
35
34
  listTitle: 'Your Spaces',
36
35
  type: 'sectioned',
37
- data: SPACES,
36
+ spaces: SPACES,
38
37
  cardStyle: 'card-style-3',
38
+ cardClicked: () => alert('clicked'),
39
+ headerStyles:{
40
+ headerBackground: 'purple',
41
+ padding: 3,
42
+ controlsStyles:{
43
+ iconColor: 'white',
44
+ iconsGap: 5
45
+ }
46
+ },
39
47
  sectionHeaderStyles: {
40
48
  cardBorderSize: 2,
41
49
  cardPadding: 2,
42
- cardBackgroundColor: '#fff',
50
+ headerBackground: 'red',
43
51
  cardBorderColor: 'black',
44
52
  },
45
53
  customCardStyles: {
@@ -19,11 +19,11 @@ import { SPACES } from '../../ViewWorld/constatnts';
19
19
  const Events = (props) => {
20
20
 
21
21
  const [events, setEvents] = useState([
22
- {title: 'Event one', date: '15-11-2020 : 5-8-2021'},
23
- {title: 'Event two', date: '14-12-2020 : 14-4-2023'},
24
- {title: 'Event three', date: '5-6-2021 : 5-8-2021'},
25
- {title: 'Event four', date: '14-4-2023'},
26
- {title: 'Event five', date: '5-6-2021 : 14-4-2023'},
22
+ { title: 'Event one', date: '15-11-2020 : 5-8-2021' },
23
+ { title: 'Event two', date: '14-12-2020 : 14-4-2023' },
24
+ { title: 'Event three', date: '5-6-2021 : 5-8-2021' },
25
+ { title: 'Event four', date: '14-4-2023' },
26
+ { title: 'Event five', date: '5-6-2021 : 14-4-2023' },
27
27
  ])
28
28
 
29
29
  const onAddEvent = (event) => {
@@ -35,7 +35,7 @@ const Events = (props) => {
35
35
  case 'delete':
36
36
  deleteEvent(index)
37
37
  break;
38
-
38
+
39
39
  default:
40
40
  break;
41
41
  }
@@ -48,80 +48,81 @@ const Events = (props) => {
48
48
  const cardClicked = (index, cardProps) => {
49
49
  console.log(cardProps)
50
50
  }
51
-
51
+
52
52
  return (
53
53
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
54
- <Navbar />
55
- <Body {...worldStyles.bodyStyle}>
56
- <Left>
57
- <WidgetContainer
58
- widgetType='logo'
59
- widgetProps={{
60
- imgUrl: props.imgUrl,
61
- }}
62
- />
63
- <WidgetContainer
64
- widgetType='list'
65
- widgetProps={{
66
- listTitle: 'Your Spaces',
67
- type: 'sectioned',
68
- data: SPACES,
69
- cardStyle: 'card-style-3',
70
- sectionHeaderStyles: {
71
- cardBorderSize: 2,
72
- cardPadding: 2,
73
- cardBackgroundColor: '#fff',
74
- cardBorderColor: 'black',
75
- },
76
- customCardStyles: {
77
- cardPadding: 6,
78
- cardTitleFontSize: 15,
79
- cardBackgroundColor: 'black',
80
- cardTitleColor: 'white',
81
- onHoverBackgroundColor: '#F6891F',
82
- controlsStyles: {
83
- showOnHover: true,
84
- }
85
- },
86
- }}
87
- />
88
- </Left>
89
- <Center>
90
- <SpaceContainer
91
- title="Music Album"
92
- discription="Lorem ipsum dolor sit amet consectetur."
93
- hideTitle
94
- >
95
- <EventsList
96
- events={events}
97
- iconColor='#FE1744'
98
- cardTitleFontSize={15}
99
- onAddEvent={onAddEvent}
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
- }}
54
+ <Navbar />
55
+ <Body {...worldStyles.bodyStyle}>
56
+ <Left>
57
+ <WidgetContainer
58
+ widgetType='logo'
59
+ widgetProps={{
60
+ imgUrl: props.imgUrl,
61
+ }}
62
+ />
63
+ <WidgetContainer
64
+ widgetType='list'
65
+ widgetProps={{
66
+ listTitle: 'Your Spaces',
67
+ type: 'sectioned',
68
+ data: SPACES,
69
+ cardStyle: 'card-style-3',
70
+ sectionHeaderStyles: {
71
+ cardBorderSize: 2,
72
+ cardPadding: 2,
73
+ cardBackgroundColor: '#fff',
74
+ cardBorderColor: 'black',
75
+ },
76
+ customCardStyles: {
77
+ cardPadding: 6,
78
+ cardTitleFontSize: 15,
79
+ cardBackgroundColor: 'black',
80
+ cardTitleColor: 'white',
81
+ onHoverBackgroundColor: '#F6891F',
82
+ controlsStyles: {
83
+ showOnHover: true,
84
+ }
85
+ },
86
+ }}
115
87
  />
88
+ </Left>
89
+ <Center>
90
+ <SpaceContainer
91
+ title="Music Album"
92
+ discription="Lorem ipsum dolor sit amet consectetur."
93
+ hideTitle
94
+ >
95
+ <EventsList
96
+ events={events}
97
+ iconColor='#FE1744'
98
+ cardTitleFontSize={15}
99
+ onAddEvent={onAddEvent}
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
+ cardBackgroundColor: 'white',
112
+ controlsStyles: {
113
+ iconColor: '#FE1744',
114
+ }
115
+ }}
116
+ />
116
117
 
117
- </SpaceContainer>
118
+ </SpaceContainer>
118
119
 
119
- </Center>
120
- <Right>
120
+ </Center>
121
+ <Right>
121
122
 
122
- </Right>
123
- </Body>
124
- </BaseMaterial>
123
+ </Right>
124
+ </Body>
125
+ </BaseMaterial>
125
126
  )
126
127
  }
127
128
 
@@ -111,7 +111,7 @@ const Library = (props) => {
111
111
  }}
112
112
  customCardStyles={{
113
113
  cardPadding: 10,
114
- iconColor: '#ff2d2d'
114
+ iconColor: '#ff2d2d',
115
115
  }}
116
116
 
117
117
  />