@mohamed-karawia/library 0.1.16 → 0.1.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. package/dist/stories/Chat/Chat.js +129 -14
  2. package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
  3. package/dist/stories/Common Inputs/Picker/Picker.js +61 -0
  4. package/dist/stories/Common Inputs/TextField/TextField.js +3 -1
  5. package/dist/stories/Community/Community.js +137 -0
  6. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +10 -12
  7. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -1
  8. package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
  9. package/dist/stories/Events/Event/Event.js +117 -5
  10. package/dist/stories/Events/EventsList/EventsList.js +98 -19
  11. package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
  12. package/dist/stories/Library/Folders/Folders.js +82 -6
  13. package/dist/stories/Library/Notes/Notes.js +78 -4
  14. package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
  15. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +138 -15
  16. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +67 -28
  17. package/dist/stories/Navbar/Navbar.js +1 -1
  18. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +8 -0
  19. package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
  20. package/dist/stories/Pages/Enrollment/Forms/Forms.js +3 -1
  21. package/dist/stories/Pages/Events/Event/Event.js +14 -5
  22. package/dist/stories/Pages/Events/Events/Events.js +1 -0
  23. package/dist/stories/Pages/Library/Folders/Library.js +2 -1
  24. package/dist/stories/Pages/Music/MusicAlbum/Music.js +8 -6
  25. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
  26. package/dist/stories/Pages/Photos/Albums/Albums.js +4 -1
  27. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +80 -19
  28. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +83 -25
  29. package/dist/stories/Preview/Preview.js +37 -0
  30. package/dist/stories/PreviewComponents/ChatPreview/ChatPreview.js +193 -0
  31. package/dist/stories/PreviewComponents/EventPreview/EventPreview.js +158 -0
  32. package/dist/stories/PreviewComponents/EventsPreview/EventsPreview.js +192 -0
  33. package/dist/stories/PreviewComponents/FoldersPreview/FoldersPreview.js +182 -0
  34. package/dist/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.js +177 -0
  35. package/dist/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.js +181 -0
  36. package/dist/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.js +153 -0
  37. package/dist/stories/PreviewComponents/NavbarPreview/NavbarPreview.js +112 -0
  38. package/dist/stories/PreviewComponents/NotesPreview/NotesPreview.js +173 -0
  39. package/dist/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.js +189 -0
  40. package/dist/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.js +189 -0
  41. package/dist/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.js +197 -0
  42. package/dist/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.js +189 -0
  43. package/dist/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.js +175 -0
  44. package/dist/stories/PreviewComponents/VideoPreview/VideoPreview.js +172 -0
  45. package/dist/stories/PreviewComponents/globalStyles.js +26 -0
  46. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +4 -3
  47. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
  48. package/dist/stories/Reusable Components/Cards/Card-style-6/CardStyle6.js +10 -4
  49. package/dist/stories/Reusable Components/Cards/Card-style-8/CardStyle8.js +4 -2
  50. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +2 -2
  51. package/dist/stories/Reusable Components/Community/Community.js +76 -0
  52. package/dist/stories/Reusable Components/Gallery/Gallery.js +17 -18
  53. package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
  54. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +20 -3
  55. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
  56. package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
  57. package/dist/stories/Sections/Sections.js +8 -2
  58. package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +77 -18
  59. package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +96 -3
  60. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +78 -5
  61. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +17 -11
  62. package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
  63. package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
  64. package/dist/stories/helpers/util.js +60 -3
  65. package/dist/stories/store/communities.js +943 -0
  66. package/dist/stories/store/store.js +44 -0
  67. package/package.json +5 -2
  68. package/src/stories/Chat/Chat.jsx +109 -13
  69. package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
  70. package/src/stories/Common Inputs/Picker/Picker.jsx +47 -0
  71. package/src/stories/Common Inputs/TextField/TextField.jsx +1 -1
  72. package/src/stories/Community/Community.jsx +110 -0
  73. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +7 -9
  74. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +3 -2
  75. package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
  76. package/src/stories/Events/Event/Event.jsx +98 -5
  77. package/src/stories/Events/EventsList/EventsList.jsx +101 -22
  78. package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
  79. package/src/stories/Library/Folders/Folders.jsx +82 -6
  80. package/src/stories/Library/Notes/Notes.jsx +65 -5
  81. package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
  82. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +133 -14
  83. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +61 -32
  84. package/src/stories/Navbar/Navbar.jsx +1 -1
  85. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +10 -1
  86. package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
  87. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +3 -1
  88. package/src/stories/Pages/Events/Event/Event.jsx +12 -4
  89. package/src/stories/Pages/Events/Events/Events.jsx +75 -74
  90. package/src/stories/Pages/Library/Folders/Library.jsx +2 -1
  91. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +8 -6
  92. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
  93. package/src/stories/Pages/Photos/Albums/Albums.jsx +3 -0
  94. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +63 -13
  95. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +66 -33
  96. package/src/stories/Preview/Preview.jsx +35 -0
  97. package/src/stories/PreviewComponents/ChatPreview/ChatPreview.jsx +132 -0
  98. package/src/stories/PreviewComponents/EventPreview/EventPreview.jsx +116 -0
  99. package/src/stories/PreviewComponents/EventsPreview/EventsPreview.jsx +132 -0
  100. package/src/stories/PreviewComponents/FoldersPreview/FoldersPreview.jsx +127 -0
  101. package/src/stories/PreviewComponents/MusicAlbumPreview/MusicAlbumPreview.jsx +124 -0
  102. package/src/stories/PreviewComponents/MusicAlbumsPreview/MusicAlbumsPreview.jsx +126 -0
  103. package/src/stories/PreviewComponents/MusicPlayerPreview/MusicPlayerPreview.jsx +113 -0
  104. package/src/stories/PreviewComponents/NavbarPreview/NavbarPreview.jsx +93 -0
  105. package/src/stories/PreviewComponents/NotesPreview/NotesPreview.jsx +122 -0
  106. package/src/stories/PreviewComponents/PhotoAlbumPreview/PhotoAlbumPreview.jsx +129 -0
  107. package/src/stories/PreviewComponents/PhotoAlbumsPreview/PhotoAlbumsPreview.jsx +129 -0
  108. package/src/stories/PreviewComponents/SpacesListPreview/SpacesListPreview.jsx +138 -0
  109. package/src/stories/PreviewComponents/VideoAlbumPreview/VideoAlbumPreview.jsx +129 -0
  110. package/src/stories/PreviewComponents/VideoAlbumsPreview/VideoAlbumsPreview.jsx +124 -0
  111. package/src/stories/PreviewComponents/VideoPreview/VideoPreview.jsx +125 -0
  112. package/src/stories/PreviewComponents/globalStyles.js +20 -0
  113. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +5 -2
  114. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
  115. package/src/stories/Reusable Components/Cards/Card-style-6/CardStyle6.jsx +12 -6
  116. package/src/stories/Reusable Components/Cards/Card-style-8/CardStyle8.jsx +2 -2
  117. package/src/stories/Reusable Components/Cards/globalCardStyles.js +2 -1
  118. package/src/stories/Reusable Components/Community/Community.jsx +70 -0
  119. package/src/stories/Reusable Components/Gallery/Gallery.jsx +15 -10
  120. package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
  121. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +19 -7
  122. package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
  123. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
  124. package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
  125. package/src/stories/Sections/Sections.jsx +5 -2
  126. package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +57 -16
  127. package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +70 -1
  128. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +65 -8
  129. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +14 -7
  130. package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
  131. package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
  132. package/src/stories/helpers/util.js +42 -2
  133. package/src/stories/store/communities.js +705 -0
  134. package/src/stories/store/store.js +33 -0
  135. package/src/stories/styling.json +92 -0
@@ -0,0 +1,132 @@
1
+ import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Preview from '../../Preview/Preview';
4
+ import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
5
+
6
+ import { Container, Left, Right } from '../globalStyles';
7
+ import Picker from '../../Common Inputs/Picker/Picker';
8
+ import TextField from '../../Common Inputs/TextField/TextField';
9
+
10
+ const EventsPreview = (props) => {
11
+ const [eventsStyles, setEventsStyles] = useState({});
12
+ const initialValues = {
13
+ headerStyles: {
14
+ headerBackground: '',
15
+ padding: 0,
16
+ titleColor: '',
17
+ titleFontSize: '',
18
+ titleFontWeight: '',
19
+ controlsStyles: {
20
+ iconSize: '',
21
+ iconColor: ''
22
+ }
23
+ },
24
+ customCardStyles: {
25
+ cardBackgroundColor: '',
26
+ onHoverBackgroundColor: '',
27
+ cardRadius: '',
28
+ cardTitleFontSize: '',
29
+ cardTitleFontWeight: '',
30
+ cardTitleColor: '',
31
+ cardImageRadius: '',
32
+ iconColor: '',
33
+ cardPadding: 0,
34
+ imgSize: 0,
35
+ cardBorderSize: 0,
36
+ cardBorderColor: '',
37
+ dateColor: '',
38
+ controlsStyles: ''
39
+ }
40
+ }
41
+
42
+ const sections = [
43
+ {
44
+ title: "Header Styles",
45
+ body: [
46
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
47
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
48
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
49
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
50
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />),
51
+ (<TextField type="number" label="Controls Size" name="headerStyles.controlsStyles.iconSize" />),
52
+ (<Picker label="Controls Color" name="headerStyles.controlsStyles.iconColor" />),
53
+ ]
54
+ },
55
+ {
56
+ title: "Card Styles",
57
+ body: [
58
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
59
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
60
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
61
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
62
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
63
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
64
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
65
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
66
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
67
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
68
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
69
+ (<Picker label="Icons Color" name="customCardStyles.iconColor" />),
70
+ (<Picker label="Date Color" name="customCardStyles.dateColor" />),
71
+ (<Picker label="Card Icon Color" name="customCardStyles.controlsStyles.iconColor" />),
72
+ ]
73
+ },
74
+ ]
75
+
76
+ const handleChange = (values) => {
77
+ if(values){
78
+ props.formChanged(values)
79
+ setEventsStyles(values)
80
+ localStorage.setItem('formStyles', JSON.stringify(values))
81
+ }
82
+ }
83
+
84
+ const submitHandler = (values) => {
85
+ console.log(values);
86
+ }
87
+
88
+ const cancelHandler = () => {
89
+ console.log('Canceled')
90
+ }
91
+
92
+ return (
93
+ <Container>
94
+ <Left>
95
+ <ReusableForm
96
+ formTitle="Events Styles"
97
+ initialValues={initialValues}
98
+ sections={sections}
99
+ headerStyles={{
100
+ padding: 10,
101
+ headerBackground: 'black',
102
+ titleColor: '#ffff',
103
+ }}
104
+ sectionHeaderStyles={{
105
+ padding: 6,
106
+ headerBackground: '#FE1744',
107
+ titleColor: '#ffff',
108
+ }}
109
+ bodyPadding={10}
110
+ saveBtnText="Save"
111
+ cancelBtnText="Cancel"
112
+ saveBtnHandle={submitHandler}
113
+ cancelHandler={cancelHandler}
114
+ handleChange={handleChange}
115
+ bodyRowGap={20}
116
+ bodyColumnGap={10}
117
+ />
118
+ </Left>
119
+ <Right>
120
+ <Preview type={'Events'} componentProps={props.componentProps} stylingProps={eventsStyles} />
121
+ </Right>
122
+ </Container>
123
+ );
124
+ };
125
+
126
+ EventsPreview.defaultProps = {};
127
+
128
+ EventsPreview.propTypes = {
129
+ componentProps: PropTypes.object
130
+ }
131
+
132
+ export default EventsPreview;
@@ -0,0 +1,127 @@
1
+ import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Preview from '../../Preview/Preview';
4
+ import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
5
+
6
+ import { Container, Left, Right } from '../globalStyles';
7
+ import Picker from '../../Common Inputs/Picker/Picker';
8
+ import TextField from '../../Common Inputs/TextField/TextField';
9
+
10
+
11
+ const FoldersPreview = (props) => {
12
+ const [foldersStyles, setFoldersStyles] = useState({});
13
+ const initialValues = {
14
+ headerStyles: {
15
+ headerBackground: '',
16
+ padding: 0,
17
+ titleColor: '',
18
+ titleFontSize: '',
19
+ titleFontWeight: '',
20
+ },
21
+ customCardStyles: {
22
+ cardBackgroundColor: '',
23
+ onHoverBackgroundColor: '',
24
+ cardRadius: '',
25
+ cardTitleFontSize: '',
26
+ cardTitleFontWeight: '',
27
+ cardTitleColor: '',
28
+ cardImageRadius: '',
29
+ cardDescriptionFontSize: '',
30
+ cardDescriptionColor: '',
31
+ cardPadding: 0,
32
+ imgSize: 0,
33
+ cardBorderSize: 0,
34
+ cardBorderColor: '',
35
+ iconColor: ''
36
+ }
37
+ }
38
+
39
+ const sections = [
40
+ {
41
+ title: "Header Styles",
42
+ body: [
43
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
44
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
45
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
46
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
47
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
48
+ ]
49
+ },
50
+ {
51
+ title: "Card Styles",
52
+ body: [
53
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
54
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
55
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
56
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
57
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
58
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
59
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
60
+ (<TextField type="number" label="Artist Font Size" name="customCardStyles.cardDescriptionFontSize" />),
61
+ (<Picker label="Artist Font Color" name="customCardStyles.cardDescriptionColor" />),
62
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
63
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
64
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
65
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
66
+ (<Picker label="Icon Color" name="customCardStyles.iconColor" />),
67
+ ]
68
+ },
69
+ ]
70
+
71
+ const handleChange = (values) => {
72
+ if(values){
73
+ props.formChanged(values)
74
+ setFoldersStyles(values)
75
+ localStorage.setItem('formStyles', JSON.stringify(values))
76
+ }
77
+ }
78
+
79
+ const submitHandler = (values) => {
80
+ console.log(values);
81
+ }
82
+
83
+ const cancelHandler = () => {
84
+ console.log('Canceled')
85
+ }
86
+
87
+ return (
88
+ <Container>
89
+ <Left>
90
+ <ReusableForm
91
+ formTitle="Folders Styles"
92
+ initialValues={initialValues}
93
+ sections={sections}
94
+ headerStyles={{
95
+ padding: 10,
96
+ headerBackground: 'black',
97
+ titleColor: '#ffff',
98
+ }}
99
+ sectionHeaderStyles={{
100
+ padding: 6,
101
+ headerBackground: '#FE1744',
102
+ titleColor: '#ffff',
103
+ }}
104
+ bodyPadding={10}
105
+ saveBtnText="Save"
106
+ cancelBtnText="Cancel"
107
+ saveBtnHandle={submitHandler}
108
+ cancelHandler={cancelHandler}
109
+ handleChange={handleChange}
110
+ bodyRowGap={20}
111
+ bodyColumnGap={10}
112
+ />
113
+ </Left>
114
+ <Right>
115
+ <Preview type={'Folders'} componentProps={props.componentProps} stylingProps={foldersStyles} />
116
+ </Right>
117
+ </Container>
118
+ );
119
+ };
120
+
121
+ FoldersPreview.defaultProps = {};
122
+
123
+ FoldersPreview.propTypes = {
124
+ componentProps: PropTypes.object
125
+ }
126
+
127
+ export default FoldersPreview;
@@ -0,0 +1,124 @@
1
+ import React, { useState, useEffect } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Preview from '../../Preview/Preview';
4
+ import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
5
+
6
+ import { Container, Left, Right } from '../globalStyles';
7
+ import Picker from '../../Common Inputs/Picker/Picker';
8
+ import TextField from '../../Common Inputs/TextField/TextField';
9
+
10
+
11
+ const MusicAlbum = (props) => {
12
+ const [musicAlbumStyles, setMusicAlbumStyles] = useState(JSON.parse(localStorage.getItem('formStyles')) || {
13
+ headerStyles: {
14
+ headerBackground: '',
15
+ padding: 0,
16
+ titleColor: '',
17
+ titleFontSize: '',
18
+ titleFontWeight: '',
19
+ },
20
+ customCardStyles: {
21
+ cardBackgroundColor: '',
22
+ onHoverBackgroundColor: '',
23
+ cardRadius: '',
24
+ cardTitleFontSize: '',
25
+ cardTitleFontWeight: '',
26
+ cardTitleColor: '',
27
+ cardImageRadius: '',
28
+ cardDescriptionFontSize: '',
29
+ cardDescriptionColor: '',
30
+ cardPadding: 0,
31
+ imgSize: 0,
32
+ cardBorderSize: 0,
33
+ cardBorderColor: 'purple'
34
+ }
35
+ });
36
+
37
+ const sections = [
38
+ {
39
+ title: "Header Styles",
40
+ body: [
41
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
42
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
43
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
44
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
45
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
46
+ ]
47
+ },
48
+ {
49
+ title: "Card Styles",
50
+ body: [
51
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
52
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
53
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
54
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
55
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
56
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
57
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
58
+ (<TextField type="number" label="Artist Font Size" name="customCardStyles.cardDescriptionFontSize" />),
59
+ (<Picker label="Artist Font Color" name="customCardStyles.cardDescriptionColor" />),
60
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
61
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
62
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
63
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
64
+ ]
65
+ },
66
+ ]
67
+
68
+ const handleChange = (values) => {
69
+ if(values){
70
+ props.formChanged(values)
71
+ setMusicAlbumStyles(values)
72
+ localStorage.setItem('formStyles', JSON.stringify(values))
73
+ }
74
+ }
75
+
76
+ const submitHandler = (values) => {
77
+ console.log(values);
78
+ }
79
+
80
+ const cancelHandler = () => {
81
+ console.log('Canceled')
82
+ }
83
+
84
+ return (
85
+ <Container>
86
+ <Left>
87
+ <ReusableForm
88
+ formTitle="Music Album Styles"
89
+ initialValues={musicAlbumStyles}
90
+ sections={sections}
91
+ headerStyles={{
92
+ padding: 10,
93
+ headerBackground: 'black',
94
+ titleColor: '#ffff',
95
+ }}
96
+ sectionHeaderStyles={{
97
+ padding: 6,
98
+ headerBackground: '#FE1744',
99
+ titleColor: '#ffff',
100
+ }}
101
+ bodyPadding={10}
102
+ saveBtnText="Save"
103
+ cancelBtnText="Cancel"
104
+ saveBtnHandle={submitHandler}
105
+ cancelHandler={cancelHandler}
106
+ handleChange={handleChange}
107
+ bodyRowGap={20}
108
+ bodyColumnGap={10}
109
+ />
110
+ </Left>
111
+ <Right>
112
+ <Preview type={'MusicAlbum'} componentProps={props.componentProps} stylingProps={musicAlbumStyles} />
113
+ </Right>
114
+ </Container>
115
+ );
116
+ };
117
+
118
+ MusicAlbum.defaultProps = {};
119
+
120
+ MusicAlbum.propTypes = {
121
+ componentProps: PropTypes.object
122
+ }
123
+
124
+ export default MusicAlbum;
@@ -0,0 +1,126 @@
1
+ import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Preview from '../../Preview/Preview';
4
+ import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
5
+
6
+ import { Container, Left, Right } from '../globalStyles';
7
+ import CustomSelect from '../../Common Inputs/CustomSelect/CustomSelect';
8
+ import Picker from '../../Common Inputs/Picker/Picker';
9
+ import TextField from '../../Common Inputs/TextField/TextField';
10
+
11
+
12
+ const MusicAlbumsPreview = (props) => {
13
+ const [musicAlbumsStyles, setMusicAlbumsStyles] = useState({})
14
+
15
+ const initialValues = {
16
+ headerStyles: {
17
+ headerBackground: '',
18
+ padding: 0,
19
+ titleColor: '',
20
+ titleFontSize: '',
21
+ titleFontWeight: '',
22
+ },
23
+ customCardStyles: {
24
+ cardBackgroundColor: '',
25
+ onHoverBackgroundColor: '',
26
+ cardRadius: '',
27
+ cardTitleFontSize: '',
28
+ cardTitleFontWeight: '',
29
+ cardTitleColor: '',
30
+ cardImageRadius: '',
31
+ cardDescriptionFontSize: '',
32
+ cardDescriptionColor: '',
33
+ cardPadding: 0,
34
+ imgSize: 0,
35
+ cardBorderSize: 0,
36
+ cardBorderColor: 'purple'
37
+ }
38
+ }
39
+
40
+ const sections = [
41
+ {
42
+ title: "Header Styles",
43
+ body: [
44
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
45
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
46
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
47
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
48
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
49
+ ]
50
+ },
51
+ {
52
+ title: "Card Styles",
53
+ body: [
54
+ (<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
55
+ (<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
56
+ (<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
57
+ (<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
58
+ (<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
59
+ (<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
60
+ (<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
61
+ (<TextField type="number" label="Artist Font Size" name="customCardStyles.cardDescriptionFontSize" />),
62
+ (<Picker label="Artist Font Color" name="customCardStyles.cardDescriptionColor" />),
63
+ (<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
64
+ (<TextField type="number" label="Image Size" name="customCardStyles.imgSize" />),
65
+ (<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
66
+ (<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
67
+ ]
68
+ },
69
+ ]
70
+
71
+ const handleChange = (values) => {
72
+ if(values){
73
+ props.formChanged(values)
74
+ setMusicAlbumsStyles(values)
75
+ localStorage.setItem('formStyles', JSON.stringify(values))
76
+ }
77
+ }
78
+
79
+ const submitHandler = (values) => {
80
+ console.log(values);
81
+ }
82
+
83
+ const cancelHandler = () => {
84
+ console.log('Canceled')
85
+ }
86
+ return (
87
+ <Container>
88
+ <Left>
89
+ <ReusableForm
90
+ formTitle="Music Albums Styles"
91
+ initialValues={initialValues}
92
+ sections={sections}
93
+ headerStyles={{
94
+ padding: 10,
95
+ headerBackground: 'black',
96
+ titleColor: '#ffff',
97
+ }}
98
+ sectionHeaderStyles={{
99
+ padding: 6,
100
+ headerBackground: '#FE1744',
101
+ titleColor: '#ffff',
102
+ }}
103
+ bodyPadding={10}
104
+ saveBtnText="Save"
105
+ cancelBtnText="Cancel"
106
+ saveBtnHandle={submitHandler}
107
+ cancelHandler={cancelHandler}
108
+ handleChange={handleChange}
109
+ bodyRowGap={20}
110
+ bodyColumnGap={10}
111
+ />
112
+ </Left>
113
+ <Right>
114
+ <Preview type={'MusicAlbums'} componentProps={props.componentProps} stylingProps={musicAlbumsStyles} da />
115
+ </Right>
116
+ </Container>
117
+ );
118
+ };
119
+
120
+ MusicAlbumsPreview.defaultProps = {};
121
+
122
+ MusicAlbumsPreview.propTypes = {
123
+ componentProps: PropTypes.object
124
+ }
125
+
126
+ export default MusicAlbumsPreview;
@@ -0,0 +1,113 @@
1
+ import React, { useState } from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import Preview from '../../Preview/Preview';
4
+ import ReusableForm from '../../Reusable Components/ReusableForm/ReusableForm';
5
+
6
+ import { Container, Left, Right } from '../globalStyles';
7
+ import CustomSelect from '../../Common Inputs/CustomSelect/CustomSelect';
8
+ import Picker from '../../Common Inputs/Picker/Picker';
9
+ import TextField from '../../Common Inputs/TextField/TextField';
10
+
11
+
12
+ const MusicPlayerPreview = (props) => {
13
+ const [musicPlayerStyles, setMusicPlayerStyles] = useState({});
14
+ const initialValues = {
15
+ headerStyles: {
16
+ headerBackground: '',
17
+ padding: 0,
18
+ titleColor: '',
19
+ titleFontSize: '',
20
+ titleFontWeight: '',
21
+ DiscriptionColor: '',
22
+ DiscriptionFontSize: '',
23
+ DiscriptionFontWeight: '',
24
+ },
25
+ backgroundColor: '',
26
+ primaryColor: '',
27
+ borderRadius: 0,
28
+ padding: 0,
29
+ fontColor: '',
30
+ fontSize: 20,
31
+ }
32
+
33
+ const sections = [
34
+ {
35
+ title: "Header Styles",
36
+ body: [
37
+ (<Picker label="Header Background" name="headerStyles.headerBackground" />),
38
+ (<TextField type="number" label="Padding" name="headerStyles.padding" />),
39
+ (<Picker label="Title Color" name="headerStyles.titleColor" />),
40
+ (<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
41
+ (<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
42
+ ]
43
+ },
44
+ {
45
+ title: "Player Styles",
46
+ body: [
47
+ (<Picker label="Background Color" name="backgroundColor" />),
48
+ (<Picker label="Primary Color" name="primaryColor" />),
49
+ (<TextField type="number" label="Border Radius" name="borderRadius" />),
50
+ (<TextField type="number" label="Padding" name="customCardStyles.cardTitleFontSize" />),
51
+ (<TextField type="number" label="Title Font Weight" name="padding" />),
52
+ (<Picker label="Font Color" name="fontColor" />),
53
+ (<TextField type="number" label="Font Size" name="fontSize" />),
54
+ ]
55
+ },
56
+ ]
57
+
58
+ const handleChange = (values) => {
59
+ if(values){
60
+ props.formChanged(values)
61
+ setMusicPlayerStyles(values)
62
+ localStorage.setItem('formStyles', JSON.stringify(values))
63
+ }
64
+ }
65
+
66
+ const submitHandler = (values) => {
67
+ console.log(values);
68
+ }
69
+
70
+ const cancelHandler = () => {
71
+ console.log('Canceled')
72
+ }
73
+ return (
74
+ <Container>
75
+ <Left>
76
+ <ReusableForm
77
+ formTitle="Music Albums Styles"
78
+ initialValues={initialValues}
79
+ sections={sections}
80
+ headerStyles={{
81
+ padding: 10,
82
+ headerBackground: 'black',
83
+ titleColor: '#ffff',
84
+ }}
85
+ sectionHeaderStyles={{
86
+ padding: 6,
87
+ headerBackground: '#FE1744',
88
+ titleColor: '#ffff',
89
+ }}
90
+ bodyPadding={10}
91
+ saveBtnText="Save"
92
+ cancelBtnText="Cancel"
93
+ saveBtnHandle={submitHandler}
94
+ cancelHandler={cancelHandler}
95
+ handleChange={handleChange}
96
+ bodyRowGap={20}
97
+ bodyColumnGap={10}
98
+ />
99
+ </Left>
100
+ <Right>
101
+ <Preview type={'MusicPlayer'} componentProps={props.componentProps} stylingProps={musicPlayerStyles} da />
102
+ </Right>
103
+ </Container>
104
+ );
105
+ };
106
+
107
+ MusicPlayerPreview.defaultProps = {};
108
+
109
+ MusicPlayerPreview.propTypes = {
110
+ componentProps: PropTypes.object
111
+ }
112
+
113
+ export default MusicPlayerPreview;