@mohamed-karawia/library 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/dist/stories/Chat/Chat.js +5 -26
  2. package/dist/stories/Enrollment/Admin/CreateForm/CreateForm.js +1 -1
  3. package/dist/stories/Enrollment/Admin/DetailedForm/DetailedForm.js +2 -12
  4. package/dist/stories/Enrollment/Admin/ViewForms/ViewForms.js +1 -16
  5. package/dist/stories/Library/Folders/Folders.js +1 -2
  6. package/dist/stories/Library/ViewNote/ViewNote.js +7 -10
  7. package/dist/stories/Music Album/ViewAlbum/ViewAlbum.js +1 -8
  8. package/dist/stories/Music Album/ViewAlbums/ViewAlbums.js +3 -6
  9. package/dist/stories/Navbar/Navbar.js +14 -44
  10. package/dist/stories/Pages/Chat/Chat.js +13 -1
  11. package/dist/stories/Pages/Enrollment/DetailedForm/DetailedForm.js +11 -1
  12. package/dist/stories/Pages/Enrollment/Forms/Forms.js +21 -1
  13. package/dist/stories/Pages/Library/Folders/Library.js +5 -0
  14. package/dist/stories/Pages/Music/MusicAlbum/Music.js +5 -0
  15. package/dist/stories/Pages/Music/MusicAlbums/MusicAlbums.js +43 -1
  16. package/dist/stories/Pages/Photos/Album/Album.js +7 -1
  17. package/dist/stories/Pages/Photos/Albums/Albums.js +34 -1
  18. package/dist/stories/Photo Album/ViewAlbum/ViewAlbum.js +0 -8
  19. package/dist/stories/Photo Album/ViewAlbums/ViewAlbums.js +3 -36
  20. package/dist/stories/Reusable Components/Cards/Card-style-10/CardStyle10.js +7 -3
  21. package/dist/stories/Reusable Components/Cards/Card-style-3/CardStyle3.js +3 -2
  22. package/dist/stories/Reusable Components/Cards/Card-style-9/CardStyle9.js +26 -15
  23. package/dist/stories/Reusable Components/Cards/globalCardStyles.js +1 -1
  24. package/dist/stories/Reusable Components/ReusableList/ReusableList.js +6 -4
  25. package/dist/stories/Sections/Sections.js +61 -0
  26. package/dist/stories/helpers/util.js +11 -5
  27. package/package.json +1 -1
  28. package/src/stories/Chat/Chat.jsx +3 -25
  29. package/src/stories/Enrollment/Admin/CreateForm/CreateForm.jsx +1 -0
  30. package/src/stories/Enrollment/Admin/DetailedForm/DetailedForm.jsx +1 -10
  31. package/src/stories/Enrollment/Admin/ViewForms/ViewForms.jsx +0 -15
  32. package/src/stories/Library/Folders/Folders.jsx +1 -3
  33. package/src/stories/Library/ViewNote/ViewNote.jsx +1 -12
  34. package/src/stories/Music Album/ViewAlbum/ViewAlbum.jsx +0 -7
  35. package/src/stories/Music Album/ViewAlbums/ViewAlbums.jsx +1 -4
  36. package/src/stories/Navbar/Navbar.jsx +50 -48
  37. package/src/stories/Pages/Chat/Chat.jsx +17 -4
  38. package/src/stories/Pages/Enrollment/DetailedForm/DetailedForm.jsx +11 -1
  39. package/src/stories/Pages/Enrollment/Forms/Forms.jsx +20 -0
  40. package/src/stories/Pages/Library/Folders/Library.jsx +5 -0
  41. package/src/stories/Pages/Music/MusicAlbum/Music.jsx +9 -3
  42. package/src/stories/Pages/Music/MusicAlbums/MusicAlbums.jsx +38 -24
  43. package/src/stories/Pages/Photos/Album/Album.jsx +7 -1
  44. package/src/stories/Pages/Photos/Albums/Albums.jsx +22 -20
  45. package/src/stories/Photo Album/ViewAlbum/ViewAlbum.jsx +0 -8
  46. package/src/stories/Photo Album/ViewAlbums/ViewAlbums.jsx +1 -35
  47. package/src/stories/Reusable Components/Cards/Card-style-10/CardStyle10.jsx +8 -4
  48. package/src/stories/Reusable Components/Cards/Card-style-3/CardStyle3.jsx +5 -2
  49. package/src/stories/Reusable Components/Cards/Card-style-9/CardStyle9.jsx +12 -8
  50. package/src/stories/Reusable Components/Cards/globalCardStyles.js +1 -1
  51. package/src/stories/Reusable Components/ReusableList/ReusableList.jsx +15 -4
  52. package/src/stories/Sections/Sections.jsx +53 -0
  53. package/src/stories/helpers/util.js +9 -5
@@ -4,14 +4,11 @@ import Select from 'react-select';
4
4
  import styled from 'styled-components';
5
5
  import CustomAutoComplete from '../Common Inputs/CustomAutoComplete/CustomAutoComplete';
6
6
  import BaseMaterial from '../Containers/BaseMaterial';
7
- import home from '../assets/home-svgrepo-com.svg';
8
- import discover from '../assets/compass-svgrepo-com.svg';
9
- import add from '../assets/add-svgrepo-com.svg';
10
- import basket from '../assets/basket-svgrepo-com.svg';
11
- import bell from '../assets/bell-svgrepo-com.svg';
12
- import medal from '../assets/medal-svgrepo-com.svg';
13
- import settings from '../assets/settings-svgrepo-com.svg';
14
- import search from '../assets/search-svgrepo-com.svg';
7
+
8
+ import { AiFillHome, AiFillCompass, AiOutlineSearch, AiFillSetting, AiFillBell } from "react-icons/ai";
9
+ import { MdAddBox } from "react-icons/md";
10
+ import { BiMedal } from "react-icons/bi";
11
+ import { IoBasketSharp } from "react-icons/io5";
15
12
 
16
13
  /* icon size can sm md lg @sm by default*/
17
14
  /* icon background color @transparent by default*/
@@ -92,30 +89,30 @@ const Navbar = ({ iconSize, iconBackgroundColor, navbarColor, dropDownItemHeight
92
89
  <BaseMaterial>
93
90
  <NavBar color={navbarColor}>
94
91
  <UniverseContainer>
95
- <IconContainer size={iconSize} color={iconBackgroundColor}>
96
- <Icon src={home} size={iconSize} />
92
+ <IconContainer >
93
+ <AiFillHome size={iconSize} color={iconBackgroundColor} />
97
94
  </IconContainer>
98
- <IconContainer size={iconSize} color={iconBackgroundColor}>
99
- <Icon src={add} size={iconSize} />
95
+ <IconContainer >
96
+ <MdAddBox size={iconSize} color={iconBackgroundColor} />
100
97
  </IconContainer>
101
98
  <div style={{ width: '200px' }}>
102
99
  <Select options={options} styles={{ color: 'blue' }} />
103
100
  </div>
104
101
  </UniverseContainer>
105
102
  <DiscoverContainer>
106
- <IconContainer size={iconSize} color={iconBackgroundColor}>
107
- <Icon src={discover} size={iconSize} />
103
+ <IconContainer>
104
+ <AiFillCompass size={iconSize} color={iconBackgroundColor} />
108
105
  </IconContainer>
109
- <IconContainer size={iconSize} color={iconBackgroundColor}>
110
- <Icon src={medal} size={iconSize} />
106
+ <IconContainer>
107
+ <BiMedal size={iconSize} color={iconBackgroundColor}/>
111
108
  </IconContainer>
112
- <IconContainer size={iconSize} color={iconBackgroundColor}>
113
- <Icon src={basket} size={iconSize} />
109
+ <IconContainer>
110
+ <IoBasketSharp size={iconSize} color={iconBackgroundColor}/>
114
111
  </IconContainer>
115
112
  </DiscoverContainer>
116
113
  <SearchContainer>
117
114
  <SearchBar>
118
- <Icon src={search} size={iconSize} />
115
+ <AiOutlineSearch color={iconBackgroundColor} />
119
116
 
120
117
  <Formik
121
118
  initialValues={initialValues}
@@ -171,11 +168,11 @@ const Navbar = ({ iconSize, iconBackgroundColor, navbarColor, dropDownItemHeight
171
168
  <UserName>illo</UserName>
172
169
  </ProfileContainer>
173
170
  <SettingsContainer>
174
- <IconContainer size={iconSize} color={iconBackgroundColor}>
175
- <Icon src={settings} size={iconSize} />
171
+ <IconContainer>
172
+ <AiFillSetting size={iconSize} color={iconBackgroundColor}/>
176
173
  </IconContainer>
177
- <IconContainer size={iconSize} color={iconBackgroundColor}>
178
- <Icon src={bell} size={iconSize} />
174
+ <IconContainer>
175
+ <AiFillBell size={iconSize} color={iconBackgroundColor}/>
179
176
  </IconContainer>
180
177
  </SettingsContainer>
181
178
  </ProfileBar>
@@ -218,22 +215,8 @@ const UniverseContainer = styled('div')({
218
215
 
219
216
  const IconContainer = styled.div`
220
217
  flex: 0 0 auto;
221
- width: ${(props) =>
222
- props.size === 'sm'
223
- ? '30px'
224
- : props.size === 'md'
225
- ? '35px'
226
- : props.size === 'lg'
227
- ? '40px'
228
- : '30px'};
229
- height: ${(props) =>
230
- props.size === 'sm'
231
- ? '30px'
232
- : props.size === 'md'
233
- ? '35px'
234
- : props.size === 'lg'
235
- ? '40px'
236
- : '30px'};
218
+
219
+
237
220
  display: flex;
238
221
  align-items: center;
239
222
  margin-left: 0px;
@@ -241,7 +224,26 @@ const IconContainer = styled.div`
241
224
  border-radius: 20px;
242
225
  flex-direction: row;
243
226
  justify-content: center;
244
- background-color: ${(props) => props.color || 'transparent'};
227
+
228
+ & svg {
229
+ width: ${(props) =>
230
+ props.size === 'sm'
231
+ ? '30px'
232
+ : props.size === 'md'
233
+ ? '35px'
234
+ : props.size === 'lg'
235
+ ? '40px'
236
+ : '30px'};
237
+ };
238
+ height: ${(props) =>
239
+ props.size === 'sm'
240
+ ? '30px'
241
+ : props.size === 'md'
242
+ ? '35px'
243
+ : props.size === 'lg'
244
+ ? '40px'
245
+ : '30px'};
246
+ fill: ${(props) => props.color || 'transparent'};
245
247
  `;
246
248
 
247
249
  const Icon = styled.img`
@@ -249,18 +251,18 @@ const Icon = styled.img`
249
251
  props.size === 'sm'
250
252
  ? '20px'
251
253
  : props.size === 'md'
252
- ? '25px'
253
- : props.size === 'lg'
254
- ? '30px'
255
- : '20px'};
254
+ ? '25px'
255
+ : props.size === 'lg'
256
+ ? '30px'
257
+ : '20px'};
256
258
  height: ${(props) =>
257
259
  props.size === 'sm'
258
260
  ? '20px'
259
261
  : props.size === 'md'
260
- ? '25px'
261
- : props.size === 'lg'
262
- ? '30px'
263
- : '20px'};
262
+ ? '25px'
263
+ : props.size === 'lg'
264
+ ? '30px'
265
+ : '20px'};
264
266
  `;
265
267
 
266
268
  const DiscoverContainer = styled('div')({
@@ -67,13 +67,26 @@ const Chat = ({
67
67
  discription="Lorem ipsum dolor sit amet consectetur."
68
68
  hideTitle
69
69
  >
70
- <ChatSpace data={data} users={users} />
71
-
70
+ <ChatSpace
71
+ data={data}
72
+ users={users}
73
+ title={'Chat'}
74
+ headerStyles={{
75
+ padding: 10,
76
+ headerBackground: '#00ADC4',
77
+ titleColor: '#ffff',
78
+ controlsStyles: {
79
+ iconSize: 25
80
+ }
81
+ }}
82
+ customCardStyles={{
83
+ cardTitleColor: '#00ADC4',
84
+ }}
85
+ />
72
86
  </SpaceContainer>
73
-
74
87
  </Center>
75
88
  <Right>
76
-
89
+
77
90
  </Right>
78
91
  </Body>
79
92
  </BaseMaterial>
@@ -86,7 +86,17 @@ const DetailedForm = (props) => {
86
86
  <Detailed
87
87
  userName="User Name"
88
88
  userImg="https://www.kindpng.com/picc/m/163-1636340_user-avatar-icon-avatar-transparent-user-icon-png.png"
89
- questions={questions} />
89
+ questions={questions}
90
+ headerStyles={{
91
+ padding: 10,
92
+ headerBackground: '#FE1744',
93
+ titleColor: '#ffff',
94
+ controlsStyles: {
95
+ dropdownBackground: 'black',
96
+ dropdownFontColor: 'white',
97
+ dropdownItemHoverColor: '#FE1744'
98
+ },
99
+ }} />
90
100
 
91
101
  </SpaceContainer>
92
102
 
@@ -73,6 +73,10 @@ const Forms = (props) => {
73
73
  console.log(cardProps)
74
74
  }
75
75
 
76
+ const onAction = (action, index) => {
77
+ console.log(action)
78
+ }
79
+
76
80
  return (
77
81
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
78
82
  <Navbar />
@@ -119,6 +123,22 @@ const Forms = (props) => {
119
123
  <ViewForms
120
124
  data={forms}
121
125
  cardClicked={cardClicked}
126
+ cardIconClicked={onAction}
127
+ headerStyles={{
128
+ padding: 10,
129
+ headerBackground: '#FE1744',
130
+ titleColor: '#ffff',
131
+ controlsStyles: {
132
+ dropdownBackground: 'black',
133
+ dropdownFontColor: 'white',
134
+ dropdownItemHoverColor: '#FE1744'
135
+ },
136
+ }}
137
+ sectionHeaderStyles={{
138
+ cardTitleColor: 'white',
139
+ cardBackgroundColor: 'black',
140
+ cardPadding: 10
141
+ }}
122
142
  />
123
143
 
124
144
  </SpaceContainer>
@@ -46,6 +46,10 @@ const Library = (props) => {
46
46
  setFolders(deleteFromArrayByIndex(folders, index))
47
47
  }
48
48
 
49
+ const cardClicked = (index, cardProps) => {
50
+ console.log(cardProps)
51
+ }
52
+
49
53
  return (
50
54
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
51
55
  <Navbar />
@@ -95,6 +99,7 @@ const Library = (props) => {
95
99
  columnsNumber={3}
96
100
  onAddFolder={onAddFolder}
97
101
  cardIconClicked={cardIconClicked}
102
+ cardClicked={cardClicked}
98
103
  headerStyles={{
99
104
  padding: 10,
100
105
  headerBackground: '#ff2d2d',
@@ -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,15 @@ 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
+ controlsStyles: {
137
+ iconColor: 'blue'
133
138
  }
134
- }} />
139
+ }}
140
+ />
135
141
  </SpaceContainer>
136
142
 
137
143
  </Center>
@@ -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':
@@ -118,27 +127,20 @@ const Albums = (props) => {
118
127
 
119
128
  </Center>
120
129
  <Right>
121
- {/* <WidgetContainer
122
- widgetType='music player'
123
- controlsStyles={{
124
- iconColor: 'black',
125
- dropdownBackground: 'black',
126
- dropdownFontColor: 'white',
127
- }}
130
+ <WidgetContainer
131
+ widgetType='folders'
128
132
  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
- /> */}
133
+ folders,
134
+ columnsNumber: 3,
135
+ customCardStyles:{
136
+ cardPadding: 10,
137
+ iconColor: '#ff2d2d',
138
+ controlsStyles: {
139
+ iconColor:'#FE1744'
140
+ }
141
+ }}
142
+ }
143
+ />
142
144
 
143
145
  </Right>
144
146
  </Body>
@@ -115,14 +115,6 @@ const ViewAlbum = ({
115
115
  data={album}
116
116
  type="flat"
117
117
  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
118
  columnsNumber={columnsNumber}
127
119
  galleryColumnGap={columnGap}
128
120
  galleryRowGap={rowGap}
@@ -18,36 +18,11 @@ const galleryControls = [
18
18
 
19
19
  const ViewAlbums = ({
20
20
  albums,
21
- cardBackgroundColor,
22
- cardTitleColor,
23
- cardTitleFontSize,
24
- albumTitleColor,
25
- countColor,
26
- countFontSize,
27
21
  columnsNumber,
28
22
  columnGap,
29
23
  rowGap,
30
24
  ...props }) => {
31
25
 
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
26
  const [showModal, setShowModal] = useState(false)
52
27
 
53
28
  const onIconClicked = (action) => {
@@ -80,14 +55,6 @@ const ViewAlbums = ({
80
55
  data={albums}
81
56
  type="flat"
82
57
  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
58
  columnsNumber={columnsNumber}
92
59
  galleryColumnGap={columnGap}
93
60
  galleryRowGap={rowGap}
@@ -95,7 +62,6 @@ const ViewAlbums = ({
95
62
  iconClicked={onIconClicked}
96
63
  cardControls={cardControls}
97
64
  cardIconClicked={cardIconClicked}
98
- customCardStyles={cardStyles}
99
65
  {...props} />
100
66
 
101
67
  <Modal
@@ -113,7 +79,7 @@ const ViewAlbums = ({
113
79
  }
114
80
 
115
81
  const Container = styled.div`
116
-
82
+ width: 100%;
117
83
  `
118
84
 
119
85
  ViewAlbums.defaultProps = {
@@ -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
 
@@ -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,31 +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
21
  <Card
22
- onClick={() => props.cardClicked()}
22
+
23
23
  {...props}>
24
24
  <ImgWrapper {...props}>
25
25
  <Img src={img} />
26
26
  </ImgWrapper>
27
27
  <Content {...props}>
28
- <Title {...props}>{username}</Title>
28
+ <Title onClick={() => props.cardClicked()} {...props}>{username}</Title>
29
29
  <Answered>Questions Answered: {answered}</Answered>
30
30
  <Buttons>
31
- <Accept onClick={onAccept}>Accept</Accept>
32
- <Decline >Decline</Decline>
33
- {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>}
34
34
  </Buttons>
35
35
  </Content>
36
36
  </Card>
@@ -57,6 +57,10 @@ const Content = styled(globalContent)`
57
57
  justify-content: space-between;
58
58
  `
59
59
 
60
+ const Title = styled(glboalTitle)`
61
+ cursor: pointer;
62
+ `
63
+
60
64
  const Answered = styled.h5`
61
65
  font-weight: 300;
62
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;