@mohamed-karawia/library 0.1.14 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. package/dist/stories/Chat/Chat.js +11 -34
  2. package/dist/stories/Common Inputs/EditorComponent/EditorComponent.js +4 -2
  3. package/dist/stories/Enrollment/Admin/CreateForm/CreateForm.js +1 -1
  4. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +11 -23
  5. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +4 -19
  6. package/dist/stories/Enrollment/Guest/FillForm/FillForm.js +4 -17
  7. package/dist/stories/Events/Event/Event.js +1 -1
  8. package/dist/stories/Events/EventsList/EventsList.js +3 -3
  9. package/dist/stories/Library/Folders/Folders.js +2 -6
  10. package/dist/stories/Library/Notes/Notes.js +3 -3
  11. package/dist/stories/Library/ViewNote/ViewNote.js +7 -10
  12. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +5 -14
  13. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +6 -12
  14. package/dist/stories/Navbar/Navbar.js +14 -44
  15. package/dist/stories/Pages/Chat/Chat.js +13 -1
  16. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +19 -1
  17. package/dist/stories/Pages/Enrollment/FillForm/FillForm.js +7 -1
  18. package/dist/stories/Pages/Enrollment/Forms/Forms.js +29 -2
  19. package/dist/stories/Pages/Events/Events/Events.js +6 -0
  20. package/dist/stories/Pages/Library/Folders/Library.js +7 -1
  21. package/dist/stories/Pages/Library/Notes/Notes.js +5 -0
  22. package/dist/stories/Pages/Music/MusicAlbum/Music.js +12 -5
  23. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +43 -1
  24. package/dist/stories/Pages/Photos/Album/Album.js +7 -1
  25. package/dist/stories/Pages/Photos/Albums/Albums.js +38 -2
  26. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +4 -18
  27. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +5 -51
  28. package/dist/stories/Preview/Preview.js +36 -0
  29. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +7 -3
  30. package/dist/stories/Reusable Components/Cards/Card-style-11/CardStyle11.js +7 -1
  31. package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +3 -2
  32. package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +27 -12
  33. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +1 -1
  34. package/dist/stories/Reusable Components/Gallery/Gallery.js +5 -1
  35. package/dist/stories/Reusable Components/ReusableForm/ReusableForm.js +1 -1
  36. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +8 -6
  37. package/dist/stories/Sections/Sections.js +61 -0
  38. package/dist/stories/VideoAlbum/ViewAlbum/ViewAlbum.js +1 -4
  39. package/dist/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.js +1 -1
  40. package/dist/stories/helpers/util.js +39 -9
  41. package/package.json +1 -1
  42. package/src/stories/Chat/Chat.jsx +10 -35
  43. package/src/stories/Common Inputs/EditorComponent/EditorComponent.jsx +3 -3
  44. package/src/stories/Enrollment/Admin/CreateForm/CreateForm.jsx +1 -0
  45. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +8 -19
  46. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +4 -17
  47. package/src/stories/Enrollment/Guest/FillForm/FillForm.jsx +6 -16
  48. package/src/stories/Events/Event/Event.jsx +1 -1
  49. package/src/stories/Events/EventsList/EventsList.jsx +11 -6
  50. package/src/stories/Library/Folders/Folders.jsx +3 -7
  51. package/src/stories/Library/Notes/Notes.jsx +8 -4
  52. package/src/stories/Library/ViewNote/ViewNote.jsx +1 -12
  53. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +9 -11
  54. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +7 -11
  55. package/src/stories/Navbar/Navbar.jsx +50 -48
  56. package/src/stories/Pages/Chat/Chat.jsx +17 -4
  57. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +20 -1
  58. package/src/stories/Pages/Enrollment/FillForm/FillForm.jsx +6 -0
  59. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +30 -2
  60. package/src/stories/Pages/Events/Events/Events.jsx +78 -72
  61. package/src/stories/Pages/Library/Folders/Library.jsx +7 -1
  62. package/src/stories/Pages/Library/Notes/Notes.jsx +5 -0
  63. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +16 -8
  64. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +38 -24
  65. package/src/stories/Pages/Photos/Album/Album.jsx +7 -1
  66. package/src/stories/Pages/Photos/Albums/Albums.jsx +25 -20
  67. package/src/stories/Pages/ViewWorld/styles.json +1 -1
  68. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +6 -17
  69. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +6 -60
  70. package/src/stories/Preview/Preview.jsx +27 -0
  71. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +8 -4
  72. package/src/stories/Reusable Components/Cards/Card-style-11/CardStyle11.jsx +5 -0
  73. package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -2
  74. package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +14 -8
  75. package/src/stories/Reusable Components/Cards/globalCardStyles.js +1 -1
  76. package/src/stories/Reusable Components/Gallery/Gallery.jsx +5 -1
  77. package/src/stories/Reusable Components/ReusableForm/ReusableForm.jsx +1 -1
  78. package/src/stories/Reusable Components/ReusableHeader/ReusableHeader.jsx +0 -2
  79. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +17 -6
  80. package/src/stories/Sections/Sections.jsx +53 -0
  81. package/src/stories/VideoAlbum/ViewAlbum/ViewAlbum.jsx +3 -5
  82. package/src/stories/Widgets/MusicPlayerWidget/MusicPlayerWidget.jsx +1 -1
  83. package/src/stories/helpers/util.js +29 -7
@@ -26,12 +26,12 @@ import img6 from '../../../assets/images/music6.jpg';
26
26
  const Music = (props) => {
27
27
  const [currentSong, setCurrentSong] = useState(0)
28
28
  const [album, setAlbum] = useState([
29
- { index: 0, cover: img4, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Plans We Made', description: 'Son Lux', time: '5:20' },
29
+ { index: 0, cover: img4, musicSrc: 'https://www.pacdv.com/sounds/free-music/gentle-thoughts-1.mp3', title: 'Plans We Made', description: 'Son Lux', time: '5:20' },
30
30
  { index: 2, cover: img6, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Still Loving You', description: 'Scorpions', time: '4:20' },
31
- { index: 1, cover: img5, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Night', description: 'Frank Ocean', time: '5:20' },
31
+ { index: 1, cover: img5, musicSrc: 'https://www.pacdv.com/sounds/free-music/glow-in-the-dark.mp3', title: 'Night', description: 'Frank Ocean', time: '5:20' },
32
32
  { index: 3, cover: img1, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Somebody Else', description: '1975', time: '5:20' },
33
- { index: 4, cover: img3, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'Enter Sandman', description: 'Metallica', time: '5:20' },
34
- { index: 5, cover: img2, musicSrc: 'https://www.pacdv.com/sounds/free-music/kickstarter.mp3', title: 'November Rain', description: "Guns N' Roses", time: '5:20' },
33
+ { index: 4, cover: img3, musicSrc: 'https://www.pacdv.com/sounds/free-music/gentle-thoughts-1.mp3', title: 'Enter Sandman', description: 'Metallica', time: '5:20' },
34
+ { index: 5, cover: img2, musicSrc: 'https://www.pacdv.com/sounds/free-music/glow-in-the-dark.mp3', title: 'November Rain', description: "Guns N' Roses", time: '5:20' },
35
35
  ])
36
36
 
37
37
  const nextSong = () => {
@@ -66,7 +66,7 @@ const Music = (props) => {
66
66
  case 'delete':
67
67
  deleteSonngFromAlbum(index)
68
68
  break;
69
-
69
+
70
70
  default:
71
71
  break;
72
72
  }
@@ -129,9 +129,16 @@ const Music = (props) => {
129
129
  headerBackground: 'black',
130
130
  titleColor: '#ffff',
131
131
  controlsStyles: {
132
- iconSize: 25
132
+ iconSize: 25
133
+ }
134
+ }}
135
+ customCardStyles={{
136
+ cardBackgroundColor: 'white',
137
+ controlsStyles: {
138
+ iconColor: 'black'
133
139
  }
134
- }} />
140
+ }}
141
+ />
135
142
  </SpaceContainer>
136
143
 
137
144
  </Center>
@@ -149,7 +156,8 @@ const Music = (props) => {
149
156
  prevSong: prevSong,
150
157
  currentSong: currentSong,
151
158
  borderRadius: '10',
152
- primaryColor: 'black'
159
+ primaryColor: 'black',
160
+ backgroundColor: 'white'
153
161
  }}
154
162
  headerStyles={{
155
163
  controlsStyles: {
@@ -60,6 +60,15 @@ const MusicAlbums = (props) => {
60
60
  const cardClicked = (index, cardProps) => {
61
61
  console.log(cardProps)
62
62
  }
63
+
64
+ const notes = [
65
+ {title: 'Study notes', date: '15/11/2020'},
66
+ {title: 'Music notes', date: '14/12/2020'},
67
+ {title: 'Workout notes', date: '5/8/2021'},
68
+ {title: 'Gaming notes', date: '14/4/2023'},
69
+ {title: 'Working notes', date: '5/6/2021'},
70
+ ]
71
+
63
72
  return (
64
73
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
65
74
  <Navbar />
@@ -104,7 +113,7 @@ const MusicAlbums = (props) => {
104
113
  hideTitle
105
114
  >
106
115
  <ViewAlbums
107
- title="Music Albums"
116
+ title="Music Albums"
108
117
  albums={albums}
109
118
  cardIconClicked={cardIconClicked}
110
119
  onAddAlbum={onAddAlbum}
@@ -116,34 +125,39 @@ const MusicAlbums = (props) => {
116
125
  iconSize: 25
117
126
  }
118
127
  }}
128
+ customCardStyles={{
129
+ darkOnHover: true,
130
+ controlsStyles: {
131
+ showOnHover: true,
132
+ position: 'center',
133
+ dropdownFontColor: "white",
134
+ iconBorderRadius: 100,
135
+ iconSize: 40,
136
+ iconsGap: 10,
137
+ iconColor: 'white',
138
+ containerPadding: 20,
139
+ }
140
+ }}
119
141
  cardClicked={cardClicked}
120
- />
142
+ />
121
143
  </SpaceContainer>
122
144
 
123
145
  </Center>
124
146
  <Right>
125
- {/* <WidgetContainer
126
- widgetType='music player'
127
- controlsStyles={{
128
- iconColor: 'black',
129
- dropdownBackground: 'black',
130
- dropdownFontColor: 'white',
131
- }}
132
- widgetProps={{
133
- playlist: album,
134
- nextSong: nextSong,
135
- prevSong: prevSong,
136
- currentSong: currentSong,
137
- borderRadius: '10',
138
- primaryColor: 'black'
139
- }}
140
- headerStyles={{
141
- controlsStyles: {
142
- iconColor: 'red',
143
- },
144
- }}
145
- /> */}
146
-
147
+ <WidgetContainer
148
+ widgetType='notes'
149
+ widgetProps={{
150
+ notes,
151
+ headerStyles:{
152
+ padding: 10,
153
+ headerBackground: 'black',
154
+ titleColor: '#ffff',
155
+ controlsStyles: {
156
+ iconSize: 25
157
+ }
158
+ }}
159
+ }
160
+ />
147
161
  </Right>
148
162
  </Body>
149
163
  </BaseMaterial>
@@ -105,7 +105,13 @@ const Album = (props) => {
105
105
  addPhoto={onAddPhoto}
106
106
  deletePhoto={onDeletePhoto}
107
107
  cardIconClicked={cardIconClicked}
108
- columnsNumber={2} />
108
+ columnsNumber={2}
109
+ headerStyles={{
110
+ padding: 10,
111
+ controlsStyles: {
112
+ iconSize: 25
113
+ }
114
+ }} />
109
115
  </SpaceContainer>
110
116
 
111
117
  </Center>
@@ -36,6 +36,15 @@ const Albums = (props) => {
36
36
  { img: img6, title: 'Album 6', count: '24' },
37
37
  ])
38
38
 
39
+ const folders = [
40
+ { title: 'Folder one', description: 'Discription for folder one' },
41
+ { title: 'Folder two', description: 'Discription for folder two' },
42
+ { title: 'Folder three', description: 'Discription for folder three' },
43
+ { title: 'Folder four', description: 'Discription for folder four' },
44
+ { title: 'Folder five', description: 'Discription for folder five' },
45
+ { title: 'Folder six', description: 'Discription for folder six' },
46
+ ]
47
+
39
48
  const cardIconClicked = (action, index) => {
40
49
  switch (action) {
41
50
  case 'delete':
@@ -113,32 +122,28 @@ const Albums = (props) => {
113
122
  onAddAlbum={onAddAlbum}
114
123
  columnsNumber={2}
115
124
  cardClicked={cardClicked}
125
+ customCardStyles={{
126
+ cardBackgroundColor: 'white'
127
+ }}
116
128
  />
117
129
  </SpaceContainer>
118
130
 
119
131
  </Center>
120
132
  <Right>
121
- {/* <WidgetContainer
122
- widgetType='music player'
123
- controlsStyles={{
124
- iconColor: 'black',
125
- dropdownBackground: 'black',
126
- dropdownFontColor: 'white',
127
- }}
133
+ <WidgetContainer
134
+ widgetType='folders'
128
135
  widgetProps={{
129
- playlist: album,
130
- nextSong: nextSong,
131
- prevSong: prevSong,
132
- currentSong: currentSong,
133
- borderRadius: '10',
134
- primaryColor: 'black'
135
- }}
136
- headerStyles={{
137
- controlsStyles: {
138
- iconColor: 'red',
139
- },
140
- }}
141
- /> */}
136
+ folders,
137
+ columnsNumber: 3,
138
+ customCardStyles:{
139
+ cardPadding: 10,
140
+ iconColor: '#ff2d2d',
141
+ controlsStyles: {
142
+ iconColor:'#FE1744'
143
+ }
144
+ }}
145
+ }
146
+ />
142
147
 
143
148
  </Right>
144
149
  </Body>
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "containerStyle": {
3
- "backgroundColor": "white"
3
+ "backgroundColor": "red"
4
4
  },
5
5
  "headStyle": {},
6
6
  "bodyStyle": {},
@@ -20,9 +20,6 @@ const ViewAlbum = ({
20
20
  album,
21
21
  cardBackgroundColor,
22
22
  imgTitleColor,
23
- columnsNumber,
24
- columnGap,
25
- rowGap,
26
23
  descColor,
27
24
  ...props
28
25
  }) => {
@@ -111,21 +108,10 @@ const ViewAlbum = ({
111
108
  return (
112
109
  <Container>
113
110
  <Gallery
114
- galleryTitle="Photo Album"
111
+ galleryTitle={props.title || "Photo Album"}
115
112
  data={album}
116
113
  type="flat"
117
114
  cardStyle="card-style-6"
118
- headerStyles={{
119
- padding: 10,
120
- headerBackground: props.headerBackground,
121
- titleColor: props.titleColor,
122
- controlsStyles: {
123
- iconSize: 25
124
- }
125
- }}
126
- columnsNumber={columnsNumber}
127
- galleryColumnGap={columnGap}
128
- galleryRowGap={rowGap}
129
115
  galleryControls={galleryControls}
130
116
  iconClicked={onIconClicked}
131
117
  cardClicked={cardClicked}
@@ -143,8 +129,8 @@ const ViewAlbum = ({
143
129
  <AddPhoto
144
130
  saveHandler={onAddPhoto}
145
131
  cancelHandler={cancelHandler}
146
- saveBtnText={'Add'}
147
- cancelBtnText={'Cancel'} />
132
+ saveBtnText={props.saveBtnText || 'Add'}
133
+ cancelBtnText={props.saveBtnText || 'Cancel'} />
148
134
  </Modal>
149
135
  <Modal
150
136
  modalIsOpen={showImgModal}
@@ -245,6 +231,9 @@ ViewAlbum.propTypes = {
245
231
  cardBackgroundColor: PropTypes.string,
246
232
  imgTitleColor: PropTypes.string,
247
233
  descColor: PropTypes.string,
234
+ title: PropTypes.string,
235
+ saveBtnText: PropTypes.string,
236
+ saveBtnText: PropTypes.string,
248
237
  }
249
238
 
250
239
  export default ViewAlbum;
@@ -18,36 +18,8 @@ const galleryControls = [
18
18
 
19
19
  const ViewAlbums = ({
20
20
  albums,
21
- cardBackgroundColor,
22
- cardTitleColor,
23
- cardTitleFontSize,
24
- albumTitleColor,
25
- countColor,
26
- countFontSize,
27
- columnsNumber,
28
- columnGap,
29
- rowGap,
30
21
  ...props }) => {
31
22
 
32
- const cardStyles = {
33
- darkOnHover: true,
34
- cardBackgroundColor,
35
- cardTitleColor,
36
- cardTitleFontSize,
37
- countColor,
38
- countFontSize,
39
- controlsStyles: {
40
- showOnHover: true,
41
- position: 'center',
42
- dropdownFontColor: "white",
43
- iconBorderRadius: 100,
44
- iconSize: 40,
45
- iconsGap: 10,
46
- iconColor: 'white',
47
- containerPadding: 20,
48
- }
49
- }
50
-
51
23
  const [showModal, setShowModal] = useState(false)
52
24
 
53
25
  const onIconClicked = (action) => {
@@ -76,26 +48,14 @@ const ViewAlbums = ({
76
48
  return (
77
49
  <Container>
78
50
  <Gallery
79
- galleryTitle="Photo Albums"
51
+ galleryTitle={props.title || "Photo Albums"}
80
52
  data={albums}
81
53
  type="flat"
82
54
  cardStyle="card-style-6"
83
- headerStyles={{
84
- padding: 10,
85
- headerBackground: props.headerBackground,
86
- titleColor: props.titleColor,
87
- controlsStyles: {
88
- iconSize: 25
89
- }
90
- }}
91
- columnsNumber={columnsNumber}
92
- galleryColumnGap={columnGap}
93
- galleryRowGap={rowGap}
94
55
  galleryControls={galleryControls}
95
56
  iconClicked={onIconClicked}
96
57
  cardControls={cardControls}
97
58
  cardIconClicked={cardIconClicked}
98
- customCardStyles={cardStyles}
99
59
  {...props} />
100
60
 
101
61
  <Modal
@@ -113,33 +73,19 @@ const ViewAlbums = ({
113
73
  }
114
74
 
115
75
  const Container = styled.div`
116
-
76
+ width: 100%;
117
77
  `
118
78
 
119
- ViewAlbums.defaultProps = {
120
- columnsNumber: 3,
121
- headerBackground: '#FE1744',
122
- titleColor: 'white',
123
- cardBackgroundColor: 'white',
124
- columnGap: 10,
125
- rowGap: 20
126
- };
79
+ ViewAlbums.defaultProps = {};
127
80
 
128
81
  ViewAlbums.propTypes = {
129
82
  albums: PropTypes.array,
130
83
  cardIconClicked: PropTypes.func,
131
84
  onDeleteAlbum: PropTypes.func,
132
85
  onAddAlbum: PropTypes.func,
133
- columnsNumber: PropTypes.number,
134
- headerBackground: PropTypes.string,
135
- titleColor: PropTypes.string,
136
- cardBackgroundColor: PropTypes.string,
137
- columnGap: PropTypes.number,
138
- rowGap: PropTypes.number,
139
- countColor: PropTypes.string,
140
- countFontSize: PropTypes.number,
141
- cardTitleColor: PropTypes.string,
142
- cardTitleFontSize: PropTypes.number,
86
+ title: PropTypes.string,
87
+ headerStyles: PropTypes.object,
88
+ customCardStyles: PropTypes.object
143
89
  }
144
90
 
145
91
  export default ViewAlbums
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import styled from 'styled-components';
3
+ import ProopTypes from 'prop-types';
4
+
5
+ import { getComponentType } from '../helpers/util';
6
+
7
+ const Preview = ({
8
+ type,
9
+ componentProps,
10
+ stylingProps,
11
+ ...props
12
+ }) => {
13
+
14
+ const child = getComponentType(type, componentProps, stylingProps);
15
+
16
+ return (
17
+ <Container>
18
+ {child}
19
+ </Container>
20
+ )
21
+ };
22
+
23
+ const Container = styled.div`
24
+ width: 100%;
25
+ `
26
+
27
+ export default Preview;
@@ -19,14 +19,19 @@ const CardStyle10 = ({
19
19
  props.iconClicked(action, props.index)
20
20
  }
21
21
 
22
+ const cardClicked = () => {
23
+ props.cardClicked()
24
+ }
25
+
22
26
 
23
27
  return (
24
28
  <Card
29
+ onClick={cardClicked}
25
30
  onMouseEnter={e => setShowIcons(true)}
26
31
  onMouseLeave={e => setShowIcons(false)}
27
32
  {...props}>
28
33
  <SvgWrapper {...props}>
29
- <AiFillFolderOpen />
34
+ <AiFillFolderOpen {...props}/>
30
35
  </SvgWrapper>
31
36
  <Content {...props}>
32
37
  <Title {...props}>{title}</Title>
@@ -42,7 +47,6 @@ const CardStyle10 = ({
42
47
  iconSize={20}
43
48
  iconsGap={10}
44
49
  maxIcons={0}
45
- iconColor='#FE1744'
46
50
  dropdownFontSize={10}
47
51
  {...props.controlsStyles} />
48
52
  </Card>
@@ -64,10 +68,10 @@ const Content = styled(globalContent)`
64
68
 
65
69
  const SvgWrapper = styled.div`
66
70
 
67
- svg{
71
+ & svg{
68
72
  width: 70px;
69
73
  height: 70px;
70
- fill: ${props => props.iconColor}
74
+ fill: ${(props) => props.iconColor}
71
75
  }
72
76
  `
73
77
 
@@ -15,8 +15,13 @@ const CardStyle11 = ({ title, date, ...props }) => {
15
15
  props.iconClicked(action, props.index)
16
16
  }
17
17
 
18
+ const cardClicked = () => {
19
+ props.cardClicked()
20
+ }
21
+
18
22
  return (
19
23
  <Card
24
+ onClick={cardClicked}
20
25
  {...props}>
21
26
  <SvgWrapper {...props}>
22
27
  <BiNotepad />
@@ -17,7 +17,7 @@ const CardStyle3 = ({ title, description, path, ...props }) => {
17
17
  }
18
18
 
19
19
  return (
20
- <MainCard
20
+ <Card
21
21
  onClick={cardClicked}
22
22
  onMouseEnter={e => setShowIcons(true)}
23
23
  onMouseLeave={e => setShowIcons(false)}
@@ -33,7 +33,7 @@ const CardStyle3 = ({ title, description, path, ...props }) => {
33
33
  show={showIcons}
34
34
  onIconClicked={iconCliked}
35
35
  {...props.controlsStyles} />}
36
- </MainCard>
36
+ </Card>
37
37
  )
38
38
  }
39
39
 
@@ -42,6 +42,9 @@ const Content = styled(globalContent)`
42
42
  row-gap: ${props => props.rowGap}px;
43
43
  `
44
44
 
45
+ const Card = styled(MainCard)`
46
+ cursor: pointer;
47
+ `
45
48
 
46
49
  CardStyle3.defaultProps = {}
47
50
 
@@ -6,29 +6,31 @@ import PropTypes from "prop-types";
6
6
  import {
7
7
  MainCard,
8
8
  globalContent,
9
- Title,
9
+ Title as glboalTitle,
10
10
  Img
11
11
  } from '../globalCardStyles';
12
12
 
13
13
  const CardStyle9 = ({ username, answered, img, status, ...props }) => {
14
14
  console.log(props)
15
15
 
16
- const onAccept = () => {
17
- alert(props.index)
16
+ const onAction = (action) => {
17
+ props.iconClicked(action)
18
18
  }
19
19
 
20
20
  return (
21
- <Card {...props}>
21
+ <Card
22
+
23
+ {...props}>
22
24
  <ImgWrapper {...props}>
23
25
  <Img src={img} />
24
26
  </ImgWrapper>
25
27
  <Content {...props}>
26
- <Title {...props}>{username}</Title>
28
+ <Title onClick={() => props.cardClicked()} {...props}>{username}</Title>
27
29
  <Answered>Questions Answered: {answered}</Answered>
28
30
  <Buttons>
29
- <Accept onClick={onAccept}>Accept</Accept>
30
- <Decline >Decline</Decline>
31
- {status === 'pending' && <Review>In Review</Review>}
31
+ <Accept onClick={() => onAction('accept')}>Accept</Accept>
32
+ <Decline onClick={() => onAction('decline')}>Decline</Decline>
33
+ {status === 'pending' && <Review onClick={() => onAction('review')}>In Review</Review>}
32
34
  </Buttons>
33
35
  </Content>
34
36
  </Card>
@@ -55,6 +57,10 @@ const Content = styled(globalContent)`
55
57
  justify-content: space-between;
56
58
  `
57
59
 
60
+ const Title = styled(glboalTitle)`
61
+ cursor: pointer;
62
+ `
63
+
58
64
  const Answered = styled.h5`
59
65
  font-weight: 300;
60
66
  `
@@ -7,7 +7,7 @@ export const MainCard = styled.div`
7
7
  }
8
8
  font-family: sans-serif;
9
9
  display: flex;
10
- background-color: ${props => props.cardBackgroundColor || 'white'};
10
+ background-color: ${props => props.cardBackgroundColor || 'transparent'};
11
11
  border-radius: ${props => props.cardRadius}px;
12
12
  border: ${props => props.cardBorderSize + 'px solid ' + props.cardBorderColor};
13
13
  align-items: center;
@@ -91,7 +91,11 @@ const SectionBody = styled.div`
91
91
  row-gap: ${props => props.galleryRowGap}px;
92
92
  `
93
93
 
94
- Gallery.defaultProps = {};
94
+ Gallery.defaultProps = {
95
+ columnsNumber: 3,
96
+ galleryColumnGap: 10,
97
+ galleryRowGap: 20
98
+ };
95
99
 
96
100
  Gallery.propTypes = {
97
101
  data: PropTypes.array.isRequired,
@@ -69,7 +69,7 @@ const ReusableForm = ({ formTitle, sections, initialValues, ...props }) => {
69
69
  }
70
70
 
71
71
  const CreateForm = styled(Form)`
72
- background-color: ${props => props.formBackgroundColor || 'white'};
72
+ background-color: ${props => props.formBackgroundColor || 'transparent'};
73
73
  display: flex;
74
74
  flex-direction: column;
75
75
 
@@ -63,8 +63,6 @@ ReusableHeader.propTypes = {
63
63
  controlsStyles: PropTypes.object,
64
64
  headerBackground: PropTypes.string,
65
65
  padding: PropTypes.number,
66
- horizontalPadding: PropTypes.number,
67
- headerMarginBottom: PropTypes.number,
68
66
  titleColor: PropTypes.string,
69
67
  titleFontSize: PropTypes.number,
70
68
  titleFontWeight: PropTypes.number,
@@ -7,15 +7,24 @@ import { getCardStyle } from '../../helpers/util';
7
7
  import CardStyle3 from '../Cards/Card-style-3/CardStyle3';
8
8
  import ReusableHeader from '../ReusableHeader/ReusableHeader';
9
9
 
10
- const ReusableList = ({ data, cardStyle, customCardStyles, type, cardControls = null, ...props }) => {
10
+ const ReusableList = ({
11
+ data,
12
+ cardStyle,
13
+ customCardStyles,
14
+ type,
15
+ cardControls = null,
16
+ headerStyles,
17
+ sectionHeaderStyles,
18
+ ...props
19
+ }) => {
11
20
  let child;
12
21
 
13
22
  const iconCliked = (action) => {
14
23
  props.iconClicked(action)
15
24
  }
16
25
 
17
- const clicked = (index) => {
18
- props.cardClicked(index)
26
+ const clicked = (index, cardProps) => {
27
+ props.cardClicked(index, cardProps)
19
28
  }
20
29
 
21
30
  const cardIconClicked = (action, index) => {
@@ -33,7 +42,7 @@ const ReusableList = ({ data, cardStyle, customCardStyles, type, cardControls =
33
42
  } else {
34
43
  child = data.map(section => (
35
44
  <Section priority={section.priority}>
36
- <CardStyle3 title={section.title} {...props.sectionHeaderStyles} />
45
+ <ReusableHeader title={section.title} {...sectionHeaderStyles} />
37
46
  <SectionBody>
38
47
  {mapOverCardsData(section.data)}
39
48
  </SectionBody>
@@ -48,7 +57,7 @@ const ReusableList = ({ data, cardStyle, customCardStyles, type, cardControls =
48
57
  title={props.listTitle}
49
58
  controls={props.listControls}
50
59
  iconClicked={iconCliked}
51
- {...props.headerStyles}
60
+ {...headerStyles}
52
61
  />}
53
62
  <ListBody {...props}>
54
63
  {child}
@@ -97,7 +106,9 @@ ReusableList.propTypes = {
97
106
  customCardStyles: PropTypes.object,
98
107
  listRowGap: PropTypes.number,
99
108
  listTitle: PropTypes.string,
100
- hideTitle: PropTypes.bool
109
+ hideTitle: PropTypes.bool,
110
+ headerStyles: PropTypes.object,
111
+ sectionHeaderStyles: PropTypes.object
101
112
  };
102
113
 
103
114
  export default ReusableList