@mohamed-karawia/library 0.1.18 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/stories/Chat/Chat.js +114 -4
- 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 +159 -0
- package/dist/stories/Events/Event/Event.js +123 -4
- package/dist/stories/Events/EventsList/EventsList.js +98 -16
- package/dist/stories/Forms/CreateSpace/CreateSpace.js +75 -0
- package/dist/stories/Library/Folders/Folders.js +94 -9
- package/dist/stories/Library/Notes/Notes.js +94 -9
- package/dist/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.js +54 -0
- package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +98 -10
- package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +96 -34
- package/dist/stories/Navbar/Navbar.js +1 -1
- package/dist/stories/Pages/Events/Event/Event.js +14 -5
- package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +2 -15
- package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +94 -17
- package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +88 -10
- package/dist/stories/Preview/Preview.js +1 -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 +4 -3
- package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +8 -4
- 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/globalCardStyles.js +2 -2
- package/dist/stories/Reusable Components/Community/Community.js +53 -0
- package/dist/stories/Reusable Components/Gallery/Gallery.js +12 -17
- package/dist/stories/Reusable Components/ReactModal/ReactModal.js +11 -30
- package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +19 -2
- package/dist/stories/Reusable Components/ReusableList/ReusableList.js +9 -5
- package/dist/stories/Reusable Components/Tabs/Tabs.js +68 -0
- package/dist/stories/Sections/Sections.js +8 -2
- package/dist/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.js +85 -19
- package/dist/stories/VideoAlbum/VideoSpace/VideoSpace.js +108 -4
- package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +84 -9
- package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +16 -10
- package/dist/stories/Widgets/SpacesListWidget/SpacesListWidget.js +115 -0
- package/dist/stories/Widgets/UsersWidget/UsersWidget.js +30 -0
- package/dist/stories/helpers/util.js +36 -3
- package/dist/stories/store/communities.js +941 -0
- package/dist/stories/store/store.js +44 -0
- package/package.json +5 -2
- package/src/stories/Chat/Chat.jsx +110 -5
- 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 +109 -0
- package/src/stories/Events/Event/Event.jsx +105 -4
- package/src/stories/Events/EventsList/EventsList.jsx +98 -17
- package/src/stories/Forms/CreateSpace/CreateSpace.jsx +73 -0
- package/src/stories/Library/Folders/Folders.jsx +94 -7
- package/src/stories/Library/Notes/Notes.jsx +73 -7
- package/src/stories/Modals/NavbarPreviewModal/NavbarPreviewModal.jsx +31 -0
- package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +81 -11
- package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +78 -34
- package/src/stories/Navbar/Navbar.jsx +1 -1
- package/src/stories/Pages/Events/Event/Event.jsx +12 -4
- package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +0 -13
- package/src/stories/Pages/ViewWorld/styles.json +1 -1
- package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +68 -6
- package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +69 -9
- package/src/stories/Preview/Preview.jsx +9 -1
- 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 +5 -2
- package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -5
- 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/globalCardStyles.js +2 -1
- package/src/stories/Reusable Components/Community/Community.jsx +47 -0
- package/src/stories/Reusable Components/Gallery/Gallery.jsx +10 -9
- package/src/stories/Reusable Components/ReactModal/ReactModal.jsx +3 -25
- package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +18 -6
- package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +9 -4
- package/src/stories/Reusable Components/Tabs/Tabs.jsx +67 -0
- package/src/stories/Sections/Sections.jsx +5 -2
- package/src/stories/VideoAlbum/AlbumsGallery/AlbumsGallery.jsx +64 -16
- package/src/stories/VideoAlbum/VideoSpace/VideoSpace.jsx +77 -1
- package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +64 -9
- package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +13 -6
- package/src/stories/Widgets/SpacesListWidget/SpacesListWidget.jsx +78 -0
- package/src/stories/Widgets/UsersWidget/UsersWidget.jsx +20 -0
- package/src/stories/helpers/util.js +24 -2
- package/src/stories/store/communities.js +703 -0
- package/src/stories/store/store.js +33 -0
- package/src/stories/styling.json +92 -0
@@ -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 = JSON.parse(localStorage.getItem('formStyles')) || {
|
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 = JSON.parse(localStorage.getItem('formStyles')) || {
|
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;
|
@@ -0,0 +1,124 @@
|
|
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 VideoAlbumsPreview = (props) => {
|
12
|
+
const [videoAlbumsStyles, setVideoAlbumsStyles] = useState({});
|
13
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
14
|
+
headerStyles: {
|
15
|
+
headerBackground: '',
|
16
|
+
padding: 0,
|
17
|
+
titleColor: '',
|
18
|
+
titleFontSize: '',
|
19
|
+
titleFontWeight: '',
|
20
|
+
controlsStyles: {
|
21
|
+
iconSize: '',
|
22
|
+
iconColor: ''
|
23
|
+
}
|
24
|
+
},
|
25
|
+
customCardStyles: {
|
26
|
+
cardBackgroundColor: '',
|
27
|
+
onHoverBackgroundColor: '',
|
28
|
+
cardRadius: '',
|
29
|
+
cardTitleFontSize: '',
|
30
|
+
cardTitleFontWeight: '',
|
31
|
+
cardTitleColor: '',
|
32
|
+
cardImageRadius: '',
|
33
|
+
cardPadding: 0,
|
34
|
+
cardBorderSize: 0,
|
35
|
+
cardBorderColor: 'purple'
|
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
|
+
(<TextField type="number" label="Controls Size" name="headerStyles.controlsStyles.iconSize" />),
|
49
|
+
(<Picker label="Controls Color" name="headerStyles.controlsStyles.iconColor" />),
|
50
|
+
]
|
51
|
+
},
|
52
|
+
{
|
53
|
+
title: "Card Styles",
|
54
|
+
body: [
|
55
|
+
(<Picker label="Card Background" name="customCardStyles.cardBackgroundColor" />),
|
56
|
+
(<Picker label="Hover Color" name="customCardStyles.onHoverBackgroundColor" />),
|
57
|
+
(<TextField type="number" label="Card Radius" name="customCardStyles.cardRadius" />),
|
58
|
+
(<TextField type="number" label="Title Font Size" name="customCardStyles.cardTitleFontSize" />),
|
59
|
+
(<TextField type="number" label="Title Font Weight" name="customCardStyles.cardTitleFontWeight" />),
|
60
|
+
(<Picker label="Title Color" name="customCardStyles.cardTitleColor" />),
|
61
|
+
(<TextField type="number" label="Card Image Radius" name="customCardStyles.cardImageRadius" />),
|
62
|
+
(<TextField type="number" label="Card Padding" name="customCardStyles.cardPadding" />),
|
63
|
+
(<TextField type="number" label="Border Size" name="customCardStyles.cardBorderSize" />),
|
64
|
+
(<Picker label="Border Color" name="customCardStyles.cardBorderColor" />),
|
65
|
+
]
|
66
|
+
},
|
67
|
+
]
|
68
|
+
|
69
|
+
const handleChange = (values) => {
|
70
|
+
if(values){
|
71
|
+
props.formChanged(values)
|
72
|
+
setVideoAlbumsStyles(values)
|
73
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
const submitHandler = (values) => {
|
78
|
+
console.log(values);
|
79
|
+
}
|
80
|
+
|
81
|
+
const cancelHandler = () => {
|
82
|
+
console.log('Canceled')
|
83
|
+
}
|
84
|
+
return (
|
85
|
+
<Container>
|
86
|
+
<Left>
|
87
|
+
<ReusableForm
|
88
|
+
formTitle="Video Albums Styles"
|
89
|
+
initialValues={initialValues}
|
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={'Video-Albums'} componentProps={props.componentProps} stylingProps={videoAlbumsStyles} />
|
113
|
+
</Right>
|
114
|
+
</Container>
|
115
|
+
);
|
116
|
+
};
|
117
|
+
|
118
|
+
VideoAlbumsPreview.defaultProps = {};
|
119
|
+
|
120
|
+
VideoAlbumsPreview.propTypes = {
|
121
|
+
componentProps: PropTypes.object
|
122
|
+
}
|
123
|
+
|
124
|
+
export default VideoAlbumsPreview;
|
@@ -0,0 +1,125 @@
|
|
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 VideoPreview = (props) => {
|
11
|
+
const [videoStyles, setVideoStyles] = useState({});
|
12
|
+
const initialValues = JSON.parse(localStorage.getItem('formStyles')) || {
|
13
|
+
headerStyles: {
|
14
|
+
headerBackground: '',
|
15
|
+
padding: 0,
|
16
|
+
titleColor: '',
|
17
|
+
titleFontSize: '',
|
18
|
+
titleFontWeight: '',
|
19
|
+
},
|
20
|
+
iconsColor: '',
|
21
|
+
backgroundColor: '',
|
22
|
+
detailsPadding: '',
|
23
|
+
titleFontSize: '',
|
24
|
+
titleColor: '',
|
25
|
+
discFontSize: '',
|
26
|
+
discColor: '',
|
27
|
+
dateFontSize: '',
|
28
|
+
dateColor: '',
|
29
|
+
commentBackgroundColor: '',
|
30
|
+
commentTitleColor: '',
|
31
|
+
commentTitleFontSize: ''
|
32
|
+
}
|
33
|
+
|
34
|
+
const sections = [
|
35
|
+
{
|
36
|
+
title: "Header Styles",
|
37
|
+
body: [
|
38
|
+
(<Picker label="Header Background" name="headerStyles.headerBackground" />),
|
39
|
+
(<TextField type="number" label="Padding" name="headerStyles.padding" />),
|
40
|
+
(<Picker label="Title Color" name="headerStyles.titleColor" />),
|
41
|
+
(<TextField type="number" label="Title Font Size" name="headerStyles.titleFontSize" />),
|
42
|
+
(<TextField type="number" label="Title Font Weight" name="headerStyles.titleFontWeight" />)
|
43
|
+
]
|
44
|
+
},
|
45
|
+
{
|
46
|
+
title: "Player Styles",
|
47
|
+
body: [
|
48
|
+
(<Picker label="Icons Color" name="iconsColor" />),
|
49
|
+
]
|
50
|
+
},
|
51
|
+
{
|
52
|
+
title: "Space Styles",
|
53
|
+
body: [
|
54
|
+
(<Picker label="Background Color" name="backgroundColor" />),
|
55
|
+
(<TextField type="number" label="Details Padding" name="detailsPadding" />),
|
56
|
+
(<TextField type="number" label="Title Font Size" name="titleFontSize" />),
|
57
|
+
(<Picker label="Title Color" name="titleColor" />),
|
58
|
+
(<TextField type="number" label="Discription Font Size" name="discFontSize" />),
|
59
|
+
(<Picker label="Discription Color" name="discColor" />),
|
60
|
+
(<TextField type="number" label="Date Font Size" name="dateFontSize" />),
|
61
|
+
(<Picker label="Date Color" name="dateColor" />),
|
62
|
+
(<Picker label="Comment Background Color" name="commentBackgroundColor" />),
|
63
|
+
(<Picker label="Comment Title Color" name="commentTitleColor" />),
|
64
|
+
(<TextField type="number" label="Comment title Font Size" name="commentTitleFontSize" />),
|
65
|
+
]
|
66
|
+
},
|
67
|
+
]
|
68
|
+
|
69
|
+
const handleChange = (values) => {
|
70
|
+
if(values){
|
71
|
+
props.formChanged(values)
|
72
|
+
setVideoStyles(values)
|
73
|
+
localStorage.setItem('formStyles', JSON.stringify(values))
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
const submitHandler = (values) => {
|
78
|
+
console.log(values);
|
79
|
+
}
|
80
|
+
|
81
|
+
const cancelHandler = () => {
|
82
|
+
console.log('Canceled')
|
83
|
+
}
|
84
|
+
|
85
|
+
return (
|
86
|
+
<Container>
|
87
|
+
<Left>
|
88
|
+
<ReusableForm
|
89
|
+
formTitle="Video Styles"
|
90
|
+
initialValues={initialValues}
|
91
|
+
sections={sections}
|
92
|
+
headerStyles={{
|
93
|
+
padding: 10,
|
94
|
+
headerBackground: 'black',
|
95
|
+
titleColor: '#ffff',
|
96
|
+
}}
|
97
|
+
sectionHeaderStyles={{
|
98
|
+
padding: 6,
|
99
|
+
headerBackground: '#FE1744',
|
100
|
+
titleColor: '#ffff',
|
101
|
+
}}
|
102
|
+
bodyPadding={10}
|
103
|
+
saveBtnText="Save"
|
104
|
+
cancelBtnText="Cancel"
|
105
|
+
saveBtnHandle={submitHandler}
|
106
|
+
cancelHandler={cancelHandler}
|
107
|
+
handleChange={handleChange}
|
108
|
+
bodyRowGap={20}
|
109
|
+
bodyColumnGap={10}
|
110
|
+
/>
|
111
|
+
</Left>
|
112
|
+
<Right>
|
113
|
+
<Preview type={'Video-Space'} componentProps={props.componentProps} stylingProps={videoStyles} />
|
114
|
+
</Right>
|
115
|
+
</Container>
|
116
|
+
);
|
117
|
+
};
|
118
|
+
|
119
|
+
VideoPreview.defaultProps = {};
|
120
|
+
|
121
|
+
VideoPreview.propTypes = {
|
122
|
+
componentProps: PropTypes.object
|
123
|
+
}
|
124
|
+
|
125
|
+
export default VideoPreview;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import styled from 'styled-components';
|
2
|
+
|
3
|
+
|
4
|
+
export const Container = styled.div`
|
5
|
+
width: 100%;
|
6
|
+
display: flex;
|
7
|
+
background-color: 'transparent';
|
8
|
+
align-items: flex-start;
|
9
|
+
`
|
10
|
+
|
11
|
+
export const Left = styled.div`
|
12
|
+
flex: 1;
|
13
|
+
`
|
14
|
+
|
15
|
+
export const Right = styled.div`
|
16
|
+
flex: 2;
|
17
|
+
position: sticky;
|
18
|
+
top: 0;
|
19
|
+
bottom: 0;
|
20
|
+
`
|
@@ -35,7 +35,7 @@ const CardStyle10 = ({
|
|
35
35
|
</SvgWrapper>
|
36
36
|
<Content {...props}>
|
37
37
|
<Title {...props}>{title}</Title>
|
38
|
-
<
|
38
|
+
<CardDescription {...props}>{description}</CardDescription>
|
39
39
|
</Content>
|
40
40
|
<Controls
|
41
41
|
controls={cardControls}
|
@@ -62,7 +62,6 @@ const Card = styled(MainCard)`
|
|
62
62
|
|
63
63
|
const Content = styled(globalContent)`
|
64
64
|
align-items: center;
|
65
|
-
justify-content: space-between;
|
66
65
|
|
67
66
|
`
|
68
67
|
|
@@ -75,6 +74,10 @@ const SvgWrapper = styled.div`
|
|
75
74
|
}
|
76
75
|
`
|
77
76
|
|
77
|
+
const CardDescription = styled(Description)`
|
78
|
+
text-align: center;
|
79
|
+
`
|
80
|
+
|
78
81
|
CardStyle10.defaultProps = {}
|
79
82
|
|
80
83
|
CardStyle10.propTypes = {
|
@@ -21,13 +21,13 @@ const CardStyle11 = ({ title, date, ...props }) => {
|
|
21
21
|
|
22
22
|
return (
|
23
23
|
<Card
|
24
|
-
|
24
|
+
|
25
25
|
{...props}>
|
26
|
-
<SvgWrapper {...props}>
|
26
|
+
<SvgWrapper onClick={cardClicked} {...props}>
|
27
27
|
<BiNotepad />
|
28
28
|
</SvgWrapper>
|
29
29
|
<Content {...props}>
|
30
|
-
<Title {...props}>{title}</Title>
|
30
|
+
<Title onClick={cardClicked} {...props}>{title}</Title>
|
31
31
|
<Date {...props}>{date}</Date>
|
32
32
|
</Content>
|
33
33
|
{props.cardControls
|
@@ -46,7 +46,7 @@ const Card = styled(MainCard)`
|
|
46
46
|
`
|
47
47
|
|
48
48
|
const Date = styled.h5`
|
49
|
-
color: gray;
|
49
|
+
color: ${props => props.dateColor || 'gray'};
|
50
50
|
font-weight: 300;
|
51
51
|
`
|
52
52
|
|
@@ -57,7 +57,7 @@ const Content = styled(globalContent)`
|
|
57
57
|
`
|
58
58
|
|
59
59
|
const SvgWrapper = styled.div`
|
60
|
-
|
60
|
+
cursor: pointer;
|
61
61
|
svg{
|
62
62
|
width: 50px;
|
63
63
|
height: 50px;
|
@@ -24,9 +24,9 @@ const CardStyle6 = ({ title, description, img, date, ...props }) => {
|
|
24
24
|
onMouseEnter={e => setShowIcons(true)}
|
25
25
|
onMouseLeave={e => setShowIcons(false)}
|
26
26
|
{...props}>
|
27
|
-
<ImgWrapper
|
28
|
-
|
29
|
-
|
27
|
+
<ImgWrapper
|
28
|
+
onClick={() => props.cardClicked()}
|
29
|
+
{...props}>
|
30
30
|
<Img src={img} />
|
31
31
|
</ImgWrapper>
|
32
32
|
<Content {...props}>
|
@@ -43,6 +43,12 @@ const CardStyle6 = ({ title, description, img, date, ...props }) => {
|
|
43
43
|
controls={props.cardControls}
|
44
44
|
show={showIcons}
|
45
45
|
onIconClicked={iconCliked}
|
46
|
+
showOnHover={true}
|
47
|
+
position='center'
|
48
|
+
dropdownFontColor="white"
|
49
|
+
iconBorderRadius={100}
|
50
|
+
iconSize={40}
|
51
|
+
iconsGap={10}
|
46
52
|
{...props.controlsStyles} />}
|
47
53
|
</Card>
|
48
54
|
)
|
@@ -51,12 +57,12 @@ const CardStyle6 = ({ title, description, img, date, ...props }) => {
|
|
51
57
|
const Card = styled(MainCard)`
|
52
58
|
flex-direction: column;
|
53
59
|
cursor: pointer;
|
54
|
-
|
60
|
+
overflow-y: scroll;
|
55
61
|
`
|
56
62
|
|
57
63
|
const ImgWrapper = styled.div`
|
58
64
|
width: 100%;
|
59
|
-
height:
|
65
|
+
min-height: 90%;
|
60
66
|
border-radius: ${props => props.cardRadius + 'px ' + props.cardRadius + 'px ' + '0 0'};
|
61
67
|
`
|
62
68
|
|
@@ -92,7 +98,7 @@ const Date = styled.p`
|
|
92
98
|
|
93
99
|
const Desc = styled(Description)`
|
94
100
|
padding: 2px 20px;
|
95
|
-
color: ${props => props.
|
101
|
+
color: ${props => props.cardDiscriptionColor};
|
96
102
|
`
|
97
103
|
|
98
104
|
CardStyle6.defaultProps = {}
|
@@ -29,7 +29,7 @@ const CardStyle8 = ({ username, date, text, img, media, ...props }) => {
|
|
29
29
|
<Content {...props}>
|
30
30
|
<Header>
|
31
31
|
<Title {...props}>{username}</Title>
|
32
|
-
<Date>{date}</Date>
|
32
|
+
<Date {...props}>{date}</Date>
|
33
33
|
</Header>
|
34
34
|
<Description {...props}>{text}</Description>
|
35
35
|
{media && <Media>
|
@@ -73,7 +73,7 @@ const Header = styled.div`
|
|
73
73
|
|
74
74
|
const Date = styled.p`
|
75
75
|
font-size: 14px;
|
76
|
-
color: gray;
|
76
|
+
color: ${props => props.dateColor || 'gray'};
|
77
77
|
`
|
78
78
|
|
79
79
|
const Media = styled.div`
|