@mohamed-karawia/library 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -85,34 +85,17 @@ var EventsList = function EventsList(_ref) {
85
85
  props.onAddEvent(event);
86
86
  };
87
87
 
88
- return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, {
88
+ return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_ReusableList.default, Object.assign({
89
89
  listTitle: "My Events",
90
90
  data: events,
91
91
  type: "flat",
92
92
  cardStyle: "card-style-11",
93
- headerStyles: {
94
- padding: 10,
95
- headerBackground: '#FE1744',
96
- titleColor: '#ffff',
97
- controlsStyles: {
98
- iconSize: 25
99
- }
100
- },
101
- customCardStyles: {
102
- iconColor: iconColor,
103
- cardTitleFontSize: cardTitleFontSize,
104
- cardTitleColor: cardTitleColor,
105
- cardPadding: cardPadding,
106
- controlsStyles: {
107
- iconColor: '#FE1744'
108
- }
109
- },
110
93
  listControls: listControls,
111
94
  cardControls: cardControls,
112
95
  iconClicked: onIconClicked,
113
96
  cardClicked: cardClicked,
114
97
  cardIconClicked: cardIconClicked
115
- }), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
98
+ }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
116
99
  modalIsOpen: showModal,
117
100
  closeModal: function closeModal() {
118
101
  return setShowModal(false);
@@ -27,7 +27,7 @@ var _CreateFolder = _interopRequireDefault(require("../CreateFolder/CreateFolder
27
27
 
28
28
  var _templateObject;
29
29
 
30
- var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor", "headerStyles"];
30
+ var _excluded = ["folders", "folderTitle", "columnsNumber", "columnGap", "rowGap", "cardClicked", "iconColor"];
31
31
 
32
32
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
33
33
 
@@ -52,7 +52,6 @@ var Folders = function Folders(_ref) {
52
52
  rowGap = _ref.rowGap,
53
53
  cardClicked = _ref.cardClicked,
54
54
  iconColor = _ref.iconColor,
55
- headerStyles = _ref.headerStyles,
56
55
  props = (0, _objectWithoutProperties2.default)(_ref, _excluded);
57
56
 
58
57
  var _useState = (0, _react.useState)(false),
@@ -84,12 +83,12 @@ var Folders = function Folders(_ref) {
84
83
  setShowModal(false);
85
84
  };
86
85
 
86
+ console.log(props);
87
87
  return /*#__PURE__*/_react.default.createElement(Container, null, /*#__PURE__*/_react.default.createElement(_Gallery.default, Object.assign({
88
88
  galleryTitle: "Your Folders",
89
89
  data: folders,
90
90
  type: "flat",
91
91
  cardStyle: "card-style-10",
92
- headerStyles: headerStyles,
93
92
  columnsNumber: columnsNumber,
94
93
  galleryColumnGap: columnGap,
95
94
  galleryRowGap: rowGap,
@@ -98,11 +97,7 @@ var Folders = function Folders(_ref) {
98
97
  cardClicked: cardClicked,
99
98
  cardIconClicked: cardIconClicked,
100
99
  cardControls: cardControls,
101
- rowsHeight: 140,
102
- customCardStyles: {
103
- cardPadding: 10,
104
- iconColor: iconColor
105
- }
100
+ rowsHeight: 140
106
101
  }, props)), /*#__PURE__*/_react.default.createElement(_ReactModal.default, {
107
102
  modalIsOpen: showModal,
108
103
  closeModal: function closeModal() {
@@ -90,15 +90,6 @@ var Notes = function Notes(_ref) {
90
90
  data: notes,
91
91
  type: "flat",
92
92
  cardStyle: "card-style-11",
93
- customCardStyles: {
94
- iconColor: iconColor,
95
- cardTitleFontSize: cardTitleFontSize,
96
- cardTitleColor: cardTitleColor,
97
- cardPadding: cardPadding,
98
- controlsStyles: {
99
- iconColor: '#FE1744'
100
- }
101
- },
102
93
  listControls: listControls,
103
94
  cardControls: cardControls,
104
95
  iconClicked: onIconClicked,
@@ -117,7 +117,20 @@ var Events = function Events(props) {
117
117
  iconColor: "#FE1744",
118
118
  cardTitleFontSize: 15,
119
119
  onAddEvent: onAddEvent,
120
- cardIconClicked: cardIconClicked
120
+ cardIconClicked: cardIconClicked,
121
+ headerStyles: {
122
+ padding: 10,
123
+ headerBackground: '#FE1744',
124
+ titleColor: '#ffff',
125
+ controlsStyles: {
126
+ iconSize: 25
127
+ }
128
+ },
129
+ customCardStyles: {
130
+ controlsStyles: {
131
+ iconColor: '#FE1744'
132
+ }
133
+ }
121
134
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
122
135
  };
123
136
 
@@ -128,6 +128,10 @@ var Library = function Library(props) {
128
128
  controlsStyles: {
129
129
  iconSize: 25
130
130
  }
131
+ },
132
+ customCardStyles: {
133
+ cardPadding: 10,
134
+ iconColor: '#ff2d2d'
131
135
  }
132
136
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
133
137
  };
@@ -123,6 +123,12 @@ var Notes = function Notes(props) {
123
123
  controlsStyles: {
124
124
  iconSize: 25
125
125
  }
126
+ },
127
+ customCardStyles: {
128
+ iconColor: '#FE1744',
129
+ controlsStyles: {
130
+ iconColor: '#FE1744'
131
+ }
126
132
  }
127
133
  }))), /*#__PURE__*/_react.default.createElement(_Right.default, null)));
128
134
  };
package/package.json CHANGED
@@ -10,7 +10,7 @@
10
10
  ]
11
11
  ]
12
12
  },
13
- "version": "0.1.13",
13
+ "version": "0.1.14",
14
14
  "private": false,
15
15
  "dependencies": {
16
16
  "@babel/cli": "^7.16.7",
@@ -68,7 +68,7 @@
68
68
  "build": "cross-env BABEL_ENV=production babel src -d dist",
69
69
  "test": "react-scripts test",
70
70
  "eject": "react-scripts eject",
71
- "storybook": "start-storybook -p 6006 -s public",
71
+ "storybook": "export NODE_OPTIONS=--openssl-legacy-provider; start-storybook -p 6006 -s public",
72
72
  "build-storybook": "build-storybook -s public"
73
73
  },
74
74
  "eslintConfig": {
@@ -60,28 +60,12 @@ const EventsList = ({
60
60
  data={events}
61
61
  type='flat'
62
62
  cardStyle="card-style-11"
63
- headerStyles={{
64
- padding: 10,
65
- headerBackground: '#FE1744',
66
- titleColor: '#ffff',
67
- controlsStyles: {
68
- iconSize: 25
69
- }
70
- }}
71
- customCardStyles={{
72
- iconColor,
73
- cardTitleFontSize,
74
- cardTitleColor,
75
- cardPadding,
76
- controlsStyles: {
77
- iconColor: '#FE1744'
78
- }
79
- }}
80
63
  listControls={listControls}
81
64
  cardControls={cardControls}
82
65
  iconClicked={onIconClicked}
83
66
  cardClicked={cardClicked}
84
67
  cardIconClicked={cardIconClicked}
68
+ {...props}
85
69
  />
86
70
  <Modal
87
71
  modalIsOpen={showModal}
@@ -23,7 +23,6 @@ const Folders = ({
23
23
  rowGap,
24
24
  cardClicked,
25
25
  iconColor,
26
- headerStyles,
27
26
  ...props
28
27
  }) => {
29
28
  const [showModal, setShowModal] = useState(false);
@@ -51,6 +50,8 @@ const Folders = ({
51
50
  setShowModal(false)
52
51
  }
53
52
 
53
+ console.log(props)
54
+
54
55
  return (
55
56
  <Container>
56
57
  <Gallery
@@ -58,7 +59,6 @@ const Folders = ({
58
59
  data={folders}
59
60
  type="flat"
60
61
  cardStyle="card-style-10"
61
- headerStyles={headerStyles}
62
62
  columnsNumber={columnsNumber}
63
63
  galleryColumnGap={columnGap}
64
64
  galleryRowGap={rowGap}
@@ -68,10 +68,6 @@ const Folders = ({
68
68
  cardIconClicked={cardIconClicked}
69
69
  cardControls={cardControls}
70
70
  rowsHeight={140}
71
- customCardStyles={{
72
- cardPadding: 10,
73
- iconColor
74
- }}
75
71
  {...props} />
76
72
  <Modal
77
73
  modalIsOpen={showModal}
@@ -60,15 +60,6 @@ const Notes = ({
60
60
  data={notes}
61
61
  type='flat'
62
62
  cardStyle="card-style-11"
63
- customCardStyles={{
64
- iconColor,
65
- cardTitleFontSize,
66
- cardTitleColor,
67
- cardPadding,
68
- controlsStyles: {
69
- iconColor: '#FE1744'
70
- }
71
- }}
72
63
  listControls={listControls}
73
64
  cardControls={cardControls}
74
65
  iconClicked={onIconClicked}
@@ -94,6 +94,19 @@ const Events = (props) => {
94
94
  cardTitleFontSize={15}
95
95
  onAddEvent={onAddEvent}
96
96
  cardIconClicked={cardIconClicked}
97
+ headerStyles={{
98
+ padding: 10,
99
+ headerBackground: '#FE1744',
100
+ titleColor: '#ffff',
101
+ controlsStyles: {
102
+ iconSize: 25
103
+ }
104
+ }}
105
+ customCardStyles={{
106
+ controlsStyles: {
107
+ iconColor: '#FE1744'
108
+ }
109
+ }}
97
110
  />
98
111
 
99
112
  </SpaceContainer>
@@ -102,7 +102,13 @@ const Library = (props) => {
102
102
  controlsStyles: {
103
103
  iconSize: 25
104
104
  }
105
- }} />
105
+ }}
106
+ customCardStyles={{
107
+ cardPadding: 10,
108
+ iconColor: '#ff2d2d'
109
+ }}
110
+
111
+ />
106
112
 
107
113
  </SpaceContainer>
108
114
 
@@ -20,11 +20,11 @@ import { SPACES } from '../../ViewWorld/constatnts';
20
20
  const Notes = (props) => {
21
21
 
22
22
  const [notes, setNotes] = useState([
23
- {title: 'Study notes', date: '15/11/2020'},
24
- {title: 'Music notes', date: '14/12/2020'},
25
- {title: 'Workout notes', date: '5/8/2021'},
26
- {title: 'Gaming notes', date: '14/4/2023'},
27
- {title: 'Working notes', date: '5/6/2021'},
23
+ { title: 'Study notes', date: '15/11/2020' },
24
+ { title: 'Music notes', date: '14/12/2020' },
25
+ { title: 'Workout notes', date: '5/8/2021' },
26
+ { title: 'Gaming notes', date: '14/4/2023' },
27
+ { title: 'Working notes', date: '5/6/2021' },
28
28
  ])
29
29
 
30
30
  const cardIconClicked = (action, index) => {
@@ -32,7 +32,7 @@ const Notes = (props) => {
32
32
  case 'delete':
33
33
  deleteNote(index)
34
34
  break;
35
-
35
+
36
36
  default:
37
37
  break;
38
38
  }
@@ -45,7 +45,7 @@ const Notes = (props) => {
45
45
  const deleteNote = (index) => {
46
46
  setNotes(deleteFromArrayByIndex(notes, index))
47
47
  }
48
-
48
+
49
49
  return (
50
50
  <BaseMaterial {...worldStyles.containerStyle} {...props}>
51
51
  <Navbar />
@@ -90,17 +90,24 @@ const Notes = (props) => {
90
90
  hideTitle
91
91
  >
92
92
  <ViewNotes
93
- onAddNote={onAddNote}
94
- cardIconClicked={cardIconClicked}
95
- notes={notes}
96
- headerStyles={{
97
- padding: 10,
98
- headerBackground: '#FE1744',
99
- titleColor: '#ffff',
100
- controlsStyles: {
101
- iconSize: 25
102
- }
103
- }} />
93
+ onAddNote={onAddNote}
94
+ cardIconClicked={cardIconClicked}
95
+ notes={notes}
96
+ headerStyles={{
97
+ padding: 10,
98
+ headerBackground: '#FE1744',
99
+ titleColor: '#ffff',
100
+ controlsStyles: {
101
+ iconSize: 25
102
+ }
103
+ }}
104
+ customCardStyles={{
105
+ iconColor: '#FE1744',
106
+ controlsStyles: {
107
+ iconColor: '#FE1744'
108
+ }
109
+ }}
110
+ />
104
111
 
105
112
  </SpaceContainer>
106
113