@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
@@ -3,12 +3,20 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
 
5
5
  import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
6
+ import { BsGear } from "react-icons/bs";
6
7
  import List from '../../Reusable Components/ReusableList/ReusableList';
7
8
  import Modal from '../../Reusable Components/ReactModal/ReactModal';
8
9
  import CreateEvent from '../CreateEvent/CreateEvent';
10
+ import EventsPreview from '../../PreviewComponents/EventsPreview/EventsPreview';
11
+ // import { Events } from './EventsList.stories';
12
+ // import { eventsList } from '../../Pages/Events/Events/Events.stories';
13
+ import Tabs from '../../Reusable Components/Tabs/Tabs';
14
+ import Sections from '../../Sections/Sections';
15
+ import Community from '../../Reusable Components/Community/Community';
9
16
 
10
17
  const listControls = [
11
18
  { icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Photo' },
19
+ { icon: (<BsGear />), action: 'config', name: 'Config' },
12
20
  ]
13
21
 
14
22
  const cardControls = [
@@ -17,31 +25,63 @@ const cardControls = [
17
25
 
18
26
  const EventsList = ({
19
27
  events,
20
- iconColor,
21
- cardTitleFontSize,
22
- cardTitleColor,
23
- cardPadding,
24
28
  ...props
25
29
  }) => {
26
30
 
27
31
  const [showModal, setShowModal] = useState(false);
32
+ const [showConfigModal, setShowConfigModal] = useState(false);
33
+ const [centerContext, setCenterContext] = useState(<EventsList events={events} />)
34
+
35
+ const formChanged = (values) => {
36
+ setCenterContext(<EventsList events={events} {...values} />)
37
+ }
38
+
39
+ let tabs = [
40
+ {
41
+ title: 'New', id: 'preview'
42
+ },
43
+ {
44
+ title: 'Context', id: 'community'
45
+ }
46
+ ]
47
+
48
+ let sections = [
49
+ {
50
+ title: 'Styles',
51
+ data: [
52
+ {
53
+ title: 'Styling',
54
+ id: 'styling'
55
+ }
56
+ ]
57
+ }
58
+ ]
28
59
 
29
60
  const onIconClicked = (action) => {
30
- switch (action) {
31
- case 'add':
32
- setShowModal(true)
33
- break;
34
- default:
35
- break;
61
+ if (!props.preview) {
62
+ switch (action) {
63
+ case 'add':
64
+ setShowModal(true)
65
+ break;
66
+ case 'config':
67
+ setShowConfigModal(true)
68
+ break;
69
+ default:
70
+ break;
71
+ }
36
72
  }
37
73
  }
38
74
 
39
75
  const cardIconClicked = (action, index) => {
40
- props.cardIconClicked(action, index)
76
+ if (!props.preview) {
77
+ props.cardIconClicked(action, index)
78
+ }
41
79
  }
42
80
 
43
- const cardClicked = () => {
44
- console.log('test')
81
+ const cardClicked = (index, props) => {
82
+ if (!props.preview) {
83
+ props.cardClicked(props)
84
+ }
45
85
  }
46
86
 
47
87
  const cancelHandler = () => {
@@ -54,9 +94,9 @@ const EventsList = ({
54
94
  }
55
95
 
56
96
  return (
57
- <Container>
97
+ <Container>
58
98
  <List
59
- listTitle="My Events"
99
+ listTitle={props.title || "My Events"}
60
100
  data={events}
61
101
  type='flat'
62
102
  cardStyle="card-style-11"
@@ -74,14 +114,51 @@ const EventsList = ({
74
114
  <div></div>
75
115
  )}>
76
116
  <CreateEvent
77
- saveBtnText="Create"
78
- cancelBtnText="Cancel"
117
+ saveBtnText={props.saveBtnText || 'Create'}
118
+ cancelBtnText={props.cancelBtnText || "Cancel"}
79
119
  saveHandler={onAddFolder}
80
120
  cancelHandler={cancelHandler}
81
121
  />
82
122
  </Modal>
123
+ <Modal
124
+ modalIsOpen={showConfigModal}
125
+ closeModal={() => setShowConfigModal(false)}
126
+ exitModalButton={(e) => (
127
+ <div></div>
128
+ )}
129
+ >
130
+ {/* <Sections
131
+ sections={sections}
132
+ backgroundColor={'white'}
133
+ sectionHeaderStyles={{
134
+ titleColor: 'white',
135
+ headerBackground: 'transparent'
136
+ }}
137
+ customCardStyles={{
138
+ cardPadding: 6,
139
+ cardTitleFontSize: 15,
140
+ cardBackgroundColor: '#2c2c2c',
141
+ cardTitleColor: 'white',
142
+ onHoverBackgroundColor: '#555555',
143
+ controlsStyles: {
144
+ showOnHover: true,
145
+ }
146
+ }} /> */}
147
+ <Tabs
148
+ title="Event Config"
149
+ tabs={tabs}>
150
+ <EventsPreview
151
+ componentProps={{ events, title: props.title || "My Events", preview: true }}
152
+ formChanged={formChanged}
153
+ id='preview'
154
+ />
155
+ <Community
156
+ center={centerContext}
157
+ id="community" />
158
+ </Tabs>
159
+ </Modal>
83
160
  </Container>
84
- )
161
+ )
85
162
  }
86
163
 
87
164
  const Container = styled.div`
@@ -92,10 +169,12 @@ EventsList.defaultProps = {};
92
169
 
93
170
  EventsList.propTypes = {
94
171
  notes: PropTypes.array.isRequired,
95
- iconColor: PropTypes.string,
96
- cardTitleFontSize: PropTypes.number,
97
- cardTitleColor: PropTypes.string,
98
- cardPadding: PropTypes.number
172
+ title: PropTypes.string,
173
+ headerStyles: PropTypes.object,
174
+ customCardStyles: PropTypes.object,
175
+ saveBtnText: PropTypes.string,
176
+ cancelBtnText: PropTypes.string,
177
+ preview: PropTypes.bool
99
178
  }
100
179
 
101
180
  export default EventsList
@@ -0,0 +1,73 @@
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import * as Yup from 'yup';
4
+ import styled from 'styled-components';
5
+
6
+ import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
7
+ import TextField from '../../Common Inputs/TextField/TextField';
8
+
9
+ const CreateSpace = (props) => {
10
+
11
+ const initialValues = {
12
+ title: ''
13
+ }
14
+
15
+ const formSchema = Yup.object().shape({
16
+ title: Yup.string()
17
+ .required("Required"),
18
+ });
19
+
20
+ const sections = [
21
+ {
22
+ title: "Space Details",
23
+ body: [
24
+ (<TextField label="Title" name="title" />),
25
+ ],
26
+ hideTitle: false
27
+ },
28
+ ]
29
+
30
+ const onCreate = (values) => {
31
+ props.saveHandler(values)
32
+ }
33
+
34
+ const cancelHandler = () => {
35
+ props.cancelHandler()
36
+ }
37
+ return (
38
+ <Container>
39
+ <ReusableForm
40
+ formTitle={props.title || "Create Space"}
41
+ initialValues={initialValues}
42
+ formSchema={formSchema}
43
+ sections={sections}
44
+ saveBtnText={props.saveBtnText || 'Create'}
45
+ cancelBtnText={props.cancelBtnText || 'Cancel'}
46
+ saveHandler={onCreate}
47
+ cancelHandler={cancelHandler}
48
+ headerStyles={{
49
+ padding: 10,
50
+ headerBackground: 'black',
51
+ titleColor: '#ffff',
52
+ }}
53
+ sectionPadding={10}
54
+ bodyRowGap={10}
55
+ {...props.formStyles}
56
+ />
57
+ </Container>
58
+ );
59
+ };
60
+
61
+ const Container = styled.div`
62
+
63
+ `
64
+
65
+ CreateSpace.defaultProps = {};
66
+
67
+ CreateSpace.propTypes = {
68
+ title: PropTypes.string,
69
+ saveBtnText: PropTypes.string,
70
+ cancelBtnText: PropTypes.string
71
+ }
72
+
73
+ export default CreateSpace;
@@ -2,13 +2,21 @@ import React, { useState } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
  import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
5
+ import { BsGear } from "react-icons/bs";
5
6
 
6
7
  import Gallery from '../../Reusable Components/Gallery/Gallery';
7
8
  import Modal from '../../Reusable Components/ReactModal/ReactModal';
8
9
  import CreateFolder from '../CreateFolder/CreateFolder';
10
+ import Tabs from '../../Reusable Components/Tabs/Tabs';
11
+ import Sections from '../../Sections/Sections'
12
+ import FoldersPreview from '../../PreviewComponents/FoldersPreview/FoldersPreview';
13
+ // import { Folders as Context } from '../../Pages/Library/Folders/Library.stories';
14
+ // import { ViewFolders } from './Folders.stories';
15
+ import Community from '../../Reusable Components/Community/Community';
9
16
 
10
17
  const galleryControls = [
11
18
  { icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Photo' },
19
+ { icon: (<BsGear />), action: 'config', name: 'Config' },
12
20
  ]
13
21
 
14
22
  const cardControls = [
@@ -26,12 +34,44 @@ const Folders = ({
26
34
  ...props
27
35
  }) => {
28
36
  const [showModal, setShowModal] = useState(false);
37
+ const [showConfigModal, setShowConfigModal] = useState(false);
38
+ const [centerContext, setCenterContext] = useState(<Folders folders={folders} />)
39
+
40
+ const formChanged = (values) => {
41
+ setCenterContext(<Folders folders={folders} {...values} />)
42
+ }
43
+
44
+ let tabs = [
45
+ {
46
+ title: 'New', id: 'preview'
47
+ },
48
+ {
49
+ title: 'Context', id: 'community'
50
+ }
51
+ ]
52
+
53
+ const sections = [
54
+ {
55
+ title: 'Styles',
56
+ data: [
57
+ {
58
+ title: 'Styling', component: (<Tabs
59
+ title="Folders Config"
60
+ tabs={tabs}
61
+ />)
62
+ }
63
+ ]
64
+ }
65
+ ]
29
66
 
30
67
  const onIconClicked = (action) => {
31
68
  switch (action) {
32
69
  case 'add':
33
70
  setShowModal(true)
34
71
  break;
72
+ case 'config':
73
+ setShowConfigModal(true)
74
+ break;
35
75
  default:
36
76
  break;
37
77
  }
@@ -53,13 +93,10 @@ const Folders = ({
53
93
  return (
54
94
  <Container>
55
95
  <Gallery
56
- galleryTitle="Your Folders"
96
+ galleryTitle={props.title || "Your Folders"}
57
97
  data={folders}
58
98
  type="flat"
59
99
  cardStyle="card-style-10"
60
- columnsNumber={columnsNumber}
61
- galleryColumnGap={columnGap}
62
- galleryRowGap={rowGap}
63
100
  galleryControls={galleryControls}
64
101
  iconClicked={onIconClicked}
65
102
  cardClicked={cardClicked}
@@ -72,7 +109,8 @@ const Folders = ({
72
109
  closeModal={() => setShowModal(false)}
73
110
  exitModalButton={(e) => (
74
111
  <div></div>
75
- )}>
112
+ )}
113
+ >
76
114
  <CreateFolder
77
115
  saveBtnText="Create"
78
116
  cancelBtnText="Cancel"
@@ -80,6 +118,43 @@ const Folders = ({
80
118
  cancelHandler={cancelHandler}
81
119
  />
82
120
  </Modal>
121
+ <Modal
122
+ modalIsOpen={showConfigModal}
123
+ closeModal={() => setShowConfigModal(false)}
124
+ exitModalButton={(e) => (
125
+ <div></div>
126
+ )}
127
+ >
128
+ {/* <Sections
129
+ sections={sections}
130
+ backgroundColor={'white'}
131
+ sectionHeaderStyles={{
132
+ titleColor: 'white',
133
+ headerBackground: 'transparent'
134
+ }}
135
+ customCardStyles={{
136
+ cardPadding: 6,
137
+ cardTitleFontSize: 15,
138
+ cardBackgroundColor: '#2c2c2c',
139
+ cardTitleColor: 'white',
140
+ onHoverBackgroundColor: '#555555',
141
+ controlsStyles: {
142
+ showOnHover: true,
143
+ }
144
+ }} /> */}
145
+ <Tabs
146
+ title="Event Config"
147
+ tabs={tabs}>
148
+ <FoldersPreview
149
+ componentProps={{ folders, title: props.title || "Your Folders" }}
150
+ formChanged={formChanged}
151
+ id='preview'
152
+ />
153
+ <Community
154
+ center={centerContext}
155
+ id="community" />
156
+ </Tabs>
157
+ </Modal>
83
158
  </Container>
84
159
  )
85
160
  }
@@ -92,6 +167,7 @@ Folders.defaultProps = {};
92
167
 
93
168
  Folders.propTypes = {
94
169
  folders: PropTypes.array,
170
+ title: PropTypes.string,
95
171
  folderTitle: PropTypes.string,
96
172
  columnsNumber: PropTypes.number,
97
173
  columnGap: PropTypes.number,
@@ -3,13 +3,18 @@ import PropTypes from 'prop-types';
3
3
  import styled from 'styled-components';
4
4
 
5
5
  import { AiOutlineFileAdd, AiFillDelete } from "react-icons/ai";
6
+ import { BsGear } from "react-icons/bs";
6
7
  import List from '../../Reusable Components/ReusableList/ReusableList';
7
8
  import Modal from '../../Reusable Components/ReactModal/ReactModal';
8
9
  import CreateFolder from '../CreateFolder/CreateFolder';
9
-
10
+ import Tabs from '../../Reusable Components/Tabs/Tabs';
11
+ import Sections from '../../Sections/Sections'
12
+ import NotesPreview from '../../PreviewComponents/NotesPreview/NotesPreview';
13
+ import Community from '../../Reusable Components/Community/Community';
10
14
 
11
15
  const listControls = [
12
16
  { icon: (<AiOutlineFileAdd />), action: 'add', name: 'Add Photo' },
17
+ { icon: (<BsGear />), action: 'config', name: 'Config' },
13
18
  ]
14
19
 
15
20
  const cardControls = [
@@ -25,12 +30,44 @@ const Notes = ({
25
30
  ...props
26
31
  }) => {
27
32
  const [showModal, setShowModal] = useState(false);
33
+ const [showConfigModal, setShowConfigModal] = useState(false);
34
+ const [centerContext, setCenterContext] = useState(<Notes notes={notes} />)
35
+
36
+ const formChanged = (values) => {
37
+ setCenterContext(<Notes notes={notes} {...values} />)
38
+ }
39
+
40
+ let tabs = [
41
+ {
42
+ title: 'New', id: 'preview'
43
+ },
44
+ {
45
+ title: 'Context', id: 'community'
46
+ }
47
+ ]
48
+
49
+ const sections = [
50
+ {
51
+ title: 'Styles',
52
+ data: [
53
+ {
54
+ title: 'Styling', component: (<Tabs
55
+ title="Notes Config"
56
+ tabs={tabs}
57
+ />)
58
+ }
59
+ ]
60
+ }
61
+ ]
28
62
 
29
63
  const onIconClicked = (action) => {
30
64
  switch (action) {
31
65
  case 'add':
32
66
  setShowModal(true)
33
67
  break;
68
+ case 'config':
69
+ setShowConfigModal(true)
70
+ break;
34
71
  default:
35
72
  break;
36
73
  }
@@ -56,7 +93,7 @@ const Notes = ({
56
93
  return (
57
94
  <Container>
58
95
  <List
59
- listTitle="My Notes"
96
+ listTitle={props.title || "My Notes"}
60
97
  data={notes}
61
98
  type='flat'
62
99
  cardStyle="card-style-11"
@@ -74,12 +111,31 @@ const Notes = ({
74
111
  <div></div>
75
112
  )}>
76
113
  <CreateFolder
77
- saveBtnText="Create"
78
- cancelBtnText="Cancel"
114
+ saveBtnText={props.saveBtnText || "Create"}
115
+ cancelBtnText={props.cancelBtnText || "Cancel"}
79
116
  saveHandler={onAddFolder}
80
117
  cancelHandler={cancelHandler}
81
118
  />
82
119
  </Modal>
120
+ <Modal
121
+ modalIsOpen={showConfigModal}
122
+ closeModal={() => setShowConfigModal(false)}
123
+ exitModalButton={(e) => (
124
+ <div></div>
125
+ )}
126
+ >
127
+ <Tabs
128
+ title="Event Config"
129
+ tabs={tabs}>
130
+ <NotesPreview
131
+ componentProps={{ notes, title: props.title || "Your Notes" }}
132
+ formChanged={formChanged }
133
+ />
134
+ <Community
135
+ center={centerContext}
136
+ id="community" />
137
+ </Tabs>
138
+ </Modal>
83
139
  </Container>
84
140
  )
85
141
  }
@@ -95,7 +151,11 @@ Notes.propTypes = {
95
151
  iconColor: PropTypes.string,
96
152
  cardTitleFontSize: PropTypes.number,
97
153
  cardTitleColor: PropTypes.string,
98
- cardPadding: PropTypes.number
154
+ cardPadding: PropTypes.number,
155
+ saveBtnText: PropTypes.string,
156
+ cancelBtnText: PropTypes.string,
157
+ headerStyles: PropTypes.object,
158
+ customCardStyles: PropTypes.object
99
159
  }
100
160
 
101
161
  export default Notes;
@@ -0,0 +1,31 @@
1
+ import React, { useState } from 'react';
2
+ import styled from 'styled-components';
3
+ import Modal from '../../Reusable Components/ReactModal/ReactModal';
4
+
5
+ import NavbarPreview from '../../PreviewComponents/NavbarPreview/NavbarPreview';
6
+ import Button from '../../Buttons/Buttons/Buttons';
7
+
8
+ const SectionedPreview = () => {
9
+ const [showModal, setShowModal] = useState(false);
10
+ return (
11
+ <Container>
12
+ <Button
13
+ label={'Open Configurator'}
14
+ size="md"
15
+ variant="primary"
16
+ buttonClicked={() => { setShowModal(true) }}
17
+ />
18
+ <Modal
19
+ modalIsOpen={showModal}
20
+ closeModal={() => setShowModal(false)}>
21
+ <NavbarPreview />
22
+ </Modal>
23
+ </Container>
24
+ );
25
+ };
26
+
27
+ const Container = styled.div`
28
+
29
+ `
30
+
31
+ export default SectionedPreview;