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