trepur_components 0.1.38 → 0.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Column/index.js +1 -1
- package/dist/components/Image/Image.stories.js +62 -0
- package/dist/components/Image/README.md +12 -0
- package/dist/components/Image/index.js +31 -0
- package/dist/components/Nav/Nav.stories.js +249 -127
- package/dist/components/Nav/index.js +84 -160
- package/dist/components/Profile/index.js +10 -3
- package/dist/components/Search/Search.stories.js +13 -2
- package/dist/components/Search/index.js +2 -2
- package/dist/components/TextAndTitle/index.js +9 -3
- package/package.json +1 -1
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports._Image = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _README = _interopRequireDefault(require("./README.md"));
|
|
11
|
+
|
|
12
|
+
var _index = _interopRequireDefault(require("./index"));
|
|
13
|
+
|
|
14
|
+
require("../../../index.css");
|
|
15
|
+
|
|
16
|
+
var _addonActions = require("@storybook/addon-actions");
|
|
17
|
+
|
|
18
|
+
var _logoWhite = _interopRequireDefault(require("../../Assets/Images/logoWhite.png"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
var _default = {
|
|
23
|
+
title: 'Components/Image',
|
|
24
|
+
argTypes: {
|
|
25
|
+
width: {
|
|
26
|
+
name: 'Type',
|
|
27
|
+
description: 'The name of the icon you wish to use',
|
|
28
|
+
control: {
|
|
29
|
+
type: 'text'
|
|
30
|
+
},
|
|
31
|
+
defaultValue: 'search'
|
|
32
|
+
},
|
|
33
|
+
height: {
|
|
34
|
+
name: 'Size',
|
|
35
|
+
description: 'an integer between 1 and 5 to dictage the magnification of the icon',
|
|
36
|
+
control: {
|
|
37
|
+
type: 'number'
|
|
38
|
+
},
|
|
39
|
+
defaultValue: 1
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
decorators: [story => /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
+
className: "p-4"
|
|
44
|
+
}, story())],
|
|
45
|
+
parameters: {
|
|
46
|
+
readme: {
|
|
47
|
+
content: _README.default
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
exports.default = _default;
|
|
52
|
+
|
|
53
|
+
const _Image = args => {
|
|
54
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
55
|
+
altText: "logo",
|
|
56
|
+
image: _logoWhite.default,
|
|
57
|
+
height: "32",
|
|
58
|
+
width: "32"
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
exports._Image = _Image;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
const Image = _ref => {
|
|
13
|
+
let {
|
|
14
|
+
image,
|
|
15
|
+
altText,
|
|
16
|
+
height,
|
|
17
|
+
width,
|
|
18
|
+
classNames
|
|
19
|
+
} = _ref;
|
|
20
|
+
const imgWidth = width && 'w-' + width;
|
|
21
|
+
const imgHeight = height && 'h-' + height;
|
|
22
|
+
const classes = imgWidth + ' ' + imgHeight + ' ' + classNames;
|
|
23
|
+
return /*#__PURE__*/_react.default.createElement("img", {
|
|
24
|
+
className: classes,
|
|
25
|
+
src: image,
|
|
26
|
+
alt: altText
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
var _default = Image;
|
|
31
|
+
exports.default = _default;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports.
|
|
6
|
+
exports.default = exports._NavWithTwoRows = exports._NavWithThreeRows = exports._NavWithOneRow = exports._Nav = exports.WithTwoRowsAsSideBar = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -17,6 +17,16 @@ var _user = _interopRequireDefault(require("../../Assets/Images/user.jpeg"));
|
|
|
17
17
|
|
|
18
18
|
var _logoWhite = _interopRequireDefault(require("../../Assets/Images/logoWhite.png"));
|
|
19
19
|
|
|
20
|
+
var _Image = _interopRequireDefault(require("../Image"));
|
|
21
|
+
|
|
22
|
+
var _Profile = _interopRequireDefault(require("../Profile"));
|
|
23
|
+
|
|
24
|
+
var _TextAndTitle = _interopRequireDefault(require("../TextAndTitle"));
|
|
25
|
+
|
|
26
|
+
var _Search = _interopRequireDefault(require("../Search"));
|
|
27
|
+
|
|
28
|
+
var _NavItem = _interopRequireDefault(require("../NavItem"));
|
|
29
|
+
|
|
20
30
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
31
|
|
|
22
32
|
const links = [{
|
|
@@ -32,6 +42,211 @@ const links = [{
|
|
|
32
42
|
name: 'link n',
|
|
33
43
|
reference: '/'
|
|
34
44
|
}];
|
|
45
|
+
const rowOneOfOne = [{
|
|
46
|
+
classNames: 'mx-auto h-full flex-none',
|
|
47
|
+
xsColumnWidth: 3,
|
|
48
|
+
smColumnWidth: 2,
|
|
49
|
+
mdColumnWidth: 1,
|
|
50
|
+
lgColumnWidth: 1,
|
|
51
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
52
|
+
classNames: "mx-auto",
|
|
53
|
+
height: "full",
|
|
54
|
+
width: "auto",
|
|
55
|
+
image: _logoWhite.default,
|
|
56
|
+
altText: "Logo"
|
|
57
|
+
})
|
|
58
|
+
}, {
|
|
59
|
+
columnClasses: 'hidden lg:inline-flex',
|
|
60
|
+
classNames: '',
|
|
61
|
+
mdColumnWidth: 3,
|
|
62
|
+
lgColumnWidth: 2,
|
|
63
|
+
component: null
|
|
64
|
+
}, {
|
|
65
|
+
classNames: 'pt-5 ',
|
|
66
|
+
xsColumnWidth: 9,
|
|
67
|
+
smColumnWidth: 10,
|
|
68
|
+
mdColumnWidth: 4,
|
|
69
|
+
lgColumnWidth: 5,
|
|
70
|
+
component: /*#__PURE__*/_react.default.createElement("ul", {
|
|
71
|
+
id: "nav-list",
|
|
72
|
+
className: "flex justify-center items-center"
|
|
73
|
+
}, links && links.map(link => {
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_NavItem.default, {
|
|
75
|
+
name: link.name,
|
|
76
|
+
url: link.reference,
|
|
77
|
+
borderColor: "black",
|
|
78
|
+
textColor: "black",
|
|
79
|
+
bgColor: "",
|
|
80
|
+
hoverBorderColor: "blue",
|
|
81
|
+
hoverTextColor: "blue",
|
|
82
|
+
hoverBgColor: "white",
|
|
83
|
+
bordered: true,
|
|
84
|
+
rounded: true
|
|
85
|
+
});
|
|
86
|
+
}))
|
|
87
|
+
}, {
|
|
88
|
+
columnClasses: 'hidden lg:inline-flex',
|
|
89
|
+
classNames: 'pt-2 mx-auto',
|
|
90
|
+
smColumnWidth: 1,
|
|
91
|
+
mdColumnWidth: 3,
|
|
92
|
+
lgColumnWidth: 4,
|
|
93
|
+
component: /*#__PURE__*/_react.default.createElement(_TextAndTitle.default, {
|
|
94
|
+
classNames: "md:pr-4 text-white",
|
|
95
|
+
title: "irupertbennett@gmail.com"
|
|
96
|
+
})
|
|
97
|
+
}];
|
|
98
|
+
const firstRowClasses = 'py-2';
|
|
99
|
+
const secondRowClasses = '';
|
|
100
|
+
const thirdRowClasses = 'py-2';
|
|
101
|
+
const rowOneOfTwo = [{
|
|
102
|
+
columnClasses: 'xs:hidden md:inline-flex',
|
|
103
|
+
classNames: 'pt-2 mx-auto',
|
|
104
|
+
smColumnWidth: 5,
|
|
105
|
+
mdColumnWidth: 5,
|
|
106
|
+
lgColumnWidth: 5,
|
|
107
|
+
component: null
|
|
108
|
+
}, {
|
|
109
|
+
classNames: 'mx-auto h-full',
|
|
110
|
+
smColumnWidth: 2,
|
|
111
|
+
mdColumnWidth: 2,
|
|
112
|
+
lgColumnWidth: 2,
|
|
113
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
114
|
+
classNames: "mx-auto",
|
|
115
|
+
height: "full",
|
|
116
|
+
width: "auto",
|
|
117
|
+
image: _logoWhite.default,
|
|
118
|
+
altText: "Logo"
|
|
119
|
+
})
|
|
120
|
+
}, {
|
|
121
|
+
columnClasses: 'lg:inline-flex hidden',
|
|
122
|
+
classNames: '',
|
|
123
|
+
mdColumnWidth: 1,
|
|
124
|
+
lgColumnWidth: 2,
|
|
125
|
+
component: null
|
|
126
|
+
}, {
|
|
127
|
+
classNames: 'pt-3',
|
|
128
|
+
smColumnWidth: 3,
|
|
129
|
+
mdColumnWidth: 3,
|
|
130
|
+
lgColumnWidth: 2,
|
|
131
|
+
component: /*#__PURE__*/_react.default.createElement(_Search.default, {
|
|
132
|
+
placeholder: "search"
|
|
133
|
+
})
|
|
134
|
+
}, {
|
|
135
|
+
classNames: 'h-full pt-2 mx-auto pr-4 ',
|
|
136
|
+
smColumnWidth: 2,
|
|
137
|
+
mdColumnWidth: 1,
|
|
138
|
+
lgColumnWidth: 1,
|
|
139
|
+
component: /*#__PURE__*/_react.default.createElement(_Profile.default, {
|
|
140
|
+
imageHeight: "12",
|
|
141
|
+
imageWidth: "auto",
|
|
142
|
+
profileLinks: links,
|
|
143
|
+
userImage: _user.default,
|
|
144
|
+
rounded: true
|
|
145
|
+
})
|
|
146
|
+
}];
|
|
147
|
+
const rowTwoOfTwo = [{
|
|
148
|
+
columnClasses: 'hidden',
|
|
149
|
+
classNames: '',
|
|
150
|
+
component: null
|
|
151
|
+
}, {
|
|
152
|
+
classNames: '',
|
|
153
|
+
smColumnWidth: 12,
|
|
154
|
+
mdColumnWidth: 12,
|
|
155
|
+
lgColumnWidth: 12,
|
|
156
|
+
component: /*#__PURE__*/_react.default.createElement("ul", {
|
|
157
|
+
id: "nav-list",
|
|
158
|
+
className: "flex justify-center items-center pt-5"
|
|
159
|
+
}, links && links.map(link => {
|
|
160
|
+
return /*#__PURE__*/_react.default.createElement(_NavItem.default, {
|
|
161
|
+
name: link.name,
|
|
162
|
+
url: link.reference,
|
|
163
|
+
borderColor: "black",
|
|
164
|
+
textColor: "black",
|
|
165
|
+
bgColor: "",
|
|
166
|
+
hoverBorderColor: "blue",
|
|
167
|
+
hoverTextColor: "blue",
|
|
168
|
+
hoverBgColor: "white",
|
|
169
|
+
bordered: true,
|
|
170
|
+
rounded: true
|
|
171
|
+
});
|
|
172
|
+
}))
|
|
173
|
+
}, {
|
|
174
|
+
columnClasses: 'hidden',
|
|
175
|
+
classNames: '',
|
|
176
|
+
component: null
|
|
177
|
+
}];
|
|
178
|
+
const mobileItems = [{
|
|
179
|
+
classNames: 'pt-3',
|
|
180
|
+
component: /*#__PURE__*/_react.default.createElement(_Search.default, {
|
|
181
|
+
placeholder: "search"
|
|
182
|
+
})
|
|
183
|
+
}, {
|
|
184
|
+
classNames: '',
|
|
185
|
+
component: /*#__PURE__*/_react.default.createElement(_Profile.default, {
|
|
186
|
+
imageHeight: "12",
|
|
187
|
+
imageWidth: "auto",
|
|
188
|
+
profileLinks: links,
|
|
189
|
+
userImage: _user.default,
|
|
190
|
+
rounded: true
|
|
191
|
+
})
|
|
192
|
+
}, {
|
|
193
|
+
classNames: '',
|
|
194
|
+
component: /*#__PURE__*/_react.default.createElement("ul", {
|
|
195
|
+
id: "nav-list",
|
|
196
|
+
className: ""
|
|
197
|
+
}, links && links.map(link => {
|
|
198
|
+
return /*#__PURE__*/_react.default.createElement(_NavItem.default, {
|
|
199
|
+
name: link.name,
|
|
200
|
+
url: link.reference,
|
|
201
|
+
bgColor: "#38B6FF",
|
|
202
|
+
textColor: "white",
|
|
203
|
+
hoverTextColor: "#38B6FF",
|
|
204
|
+
hoverBgColor: "white",
|
|
205
|
+
rounded: true
|
|
206
|
+
});
|
|
207
|
+
}))
|
|
208
|
+
}];
|
|
209
|
+
const thirdRow = [{
|
|
210
|
+
smColumnWidth: 6,
|
|
211
|
+
mdColumnWidth: 4,
|
|
212
|
+
lgColumnWidth: 4,
|
|
213
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
214
|
+
classNames: "mx-auto h-full",
|
|
215
|
+
height: "32",
|
|
216
|
+
width: "auto",
|
|
217
|
+
image: _logoWhite.default,
|
|
218
|
+
altText: "Logo"
|
|
219
|
+
})
|
|
220
|
+
}, {
|
|
221
|
+
smColumnWidth: 0,
|
|
222
|
+
mdColumnWidth: 4,
|
|
223
|
+
lgColumnWidth: 4,
|
|
224
|
+
component: null
|
|
225
|
+
}, {
|
|
226
|
+
smColumnWidth: 6,
|
|
227
|
+
mdColumnWidth: 4,
|
|
228
|
+
lgColumnWidth: 4,
|
|
229
|
+
component: /*#__PURE__*/_react.default.createElement(_Image.default, {
|
|
230
|
+
classNames: "mx-auto h-full",
|
|
231
|
+
height: "32",
|
|
232
|
+
width: "auto",
|
|
233
|
+
image: _logoWhite.default,
|
|
234
|
+
altText: "Logo"
|
|
235
|
+
})
|
|
236
|
+
}];
|
|
237
|
+
const profileLinks = [{
|
|
238
|
+
name: 'PROFILE ITEM 1',
|
|
239
|
+
reference: '/'
|
|
240
|
+
}, {
|
|
241
|
+
name: 'PROFILE ITEM 2',
|
|
242
|
+
reference: '/'
|
|
243
|
+
}, {
|
|
244
|
+
name: 'PROFILE ITEM 3',
|
|
245
|
+
reference: '/'
|
|
246
|
+
}, {
|
|
247
|
+
name: 'PROFILE ITEM 4',
|
|
248
|
+
reference: '/'
|
|
249
|
+
}];
|
|
35
250
|
var _default = {
|
|
36
251
|
title: 'Components/Nav',
|
|
37
252
|
argTypes: {},
|
|
@@ -46,153 +261,60 @@ exports.default = _default;
|
|
|
46
261
|
|
|
47
262
|
const _Nav = args => {
|
|
48
263
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
navItemRounded: false
|
|
264
|
+
firstRow: rowOneOfTwo,
|
|
265
|
+
secondRow: rowTwoOfTwo,
|
|
266
|
+
thirdRow: thirdRow,
|
|
267
|
+
mobileItems: mobileItems
|
|
54
268
|
});
|
|
55
269
|
};
|
|
56
270
|
|
|
57
271
|
exports._Nav = _Nav;
|
|
58
272
|
|
|
59
|
-
const
|
|
60
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
61
|
-
links: links,
|
|
62
|
-
navPosition: "1" //center
|
|
63
|
-
,
|
|
64
|
-
navClass: "py-4",
|
|
65
|
-
logoImage: _logoWhite.default,
|
|
66
|
-
icon: _user.default,
|
|
67
|
-
navItemBorderColor: "white",
|
|
68
|
-
navItemTextColor: "white",
|
|
69
|
-
navItemBgColor: "#38B6FF",
|
|
70
|
-
hoverNavItemBorderColor: "#38B6FF",
|
|
71
|
-
hoverNavItemTextColor: "#38B6FF",
|
|
72
|
-
hoverNavItemBgColor: "white",
|
|
73
|
-
bgColor: "#38B6FF",
|
|
74
|
-
navItemBordered: true,
|
|
75
|
-
navItemRounded: true,
|
|
76
|
-
showProfile: false,
|
|
77
|
-
showSearch: false,
|
|
78
|
-
alignNavAndLogo: false,
|
|
79
|
-
navItemLinkClassNames: "py-1",
|
|
80
|
-
mobileNavItemBordered: false,
|
|
81
|
-
mobileNavItemRounded: true,
|
|
82
|
-
mobileNavItemLinkClassNames: "",
|
|
83
|
-
mobileNavItemClassNames: "",
|
|
84
|
-
mobileNavButtonBgColor: "#38B6FF",
|
|
85
|
-
mobileNavButtonColor: "white",
|
|
86
|
-
hoverMobileNavButtonBgColor: "white",
|
|
87
|
-
hoverMobileNavButtonColor: "#38B6FF"
|
|
88
|
-
});
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
exports._NavWithColors = _NavWithColors;
|
|
92
|
-
|
|
93
|
-
const NavWithSearch = () => {
|
|
94
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
95
|
-
links: links,
|
|
96
|
-
navPosition: "1",
|
|
97
|
-
navClass: "bg-brand-primary",
|
|
98
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
99
|
-
logoClass: "py-4",
|
|
100
|
-
showSearch: true,
|
|
101
|
-
logoImage: _logoWhite.default
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
exports.NavWithSearch = NavWithSearch;
|
|
106
|
-
|
|
107
|
-
const NavWithProfile = () => {
|
|
108
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
109
|
-
links: links,
|
|
110
|
-
navPosition: "1",
|
|
111
|
-
navClass: "bg-brand-primary",
|
|
112
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
113
|
-
logoClass: "py-4",
|
|
114
|
-
showProfile: true,
|
|
115
|
-
icon: _user.default,
|
|
116
|
-
logoImage: _logoWhite.default
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
exports.NavWithProfile = NavWithProfile;
|
|
121
|
-
|
|
122
|
-
const NavWithSearchAndProfile = () => {
|
|
123
|
-
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
124
|
-
links: links,
|
|
125
|
-
navPosition: "1",
|
|
126
|
-
navClass: "bg-brand-primary",
|
|
127
|
-
navLinkClass: "px-2 py-2 rounded-lg flex-1 hover:text-white hover:bg-black",
|
|
128
|
-
logoClass: "py-4",
|
|
129
|
-
showProfile: true,
|
|
130
|
-
showSearch: true,
|
|
131
|
-
logoImage: _logoWhite.default,
|
|
132
|
-
icon: _user.default
|
|
133
|
-
});
|
|
134
|
-
};
|
|
135
|
-
|
|
136
|
-
exports.NavWithSearchAndProfile = NavWithSearchAndProfile;
|
|
137
|
-
|
|
138
|
-
const NavAligned = () => {
|
|
273
|
+
const _NavWithOneRow = args => {
|
|
139
274
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
navLinkClass: "hover:text-white hover:bg-black",
|
|
144
|
-
alignNavAndLogo: true,
|
|
145
|
-
logoImage: _logoWhite.default,
|
|
146
|
-
icon: _user.default
|
|
275
|
+
firstRow: rowOneOfOne,
|
|
276
|
+
firstRowClasses: firstRowClasses,
|
|
277
|
+
mobileItems: mobileItems
|
|
147
278
|
});
|
|
148
279
|
};
|
|
149
280
|
|
|
150
|
-
exports.
|
|
281
|
+
exports._NavWithOneRow = _NavWithOneRow;
|
|
151
282
|
|
|
152
|
-
const
|
|
283
|
+
const _NavWithTwoRows = args => {
|
|
153
284
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
logoImage: _logoWhite.default,
|
|
160
|
-
icon: _user.default,
|
|
161
|
-
showProfile: false,
|
|
162
|
-
showSearch: true
|
|
285
|
+
firstRow: rowOneOfTwo,
|
|
286
|
+
firstRowClasses: firstRowClasses,
|
|
287
|
+
secondRow: rowTwoOfTwo,
|
|
288
|
+
secondRowClasses: secondRowClasses,
|
|
289
|
+
mobileItems: mobileItems
|
|
163
290
|
});
|
|
164
291
|
};
|
|
165
292
|
|
|
166
|
-
exports.
|
|
293
|
+
exports._NavWithTwoRows = _NavWithTwoRows;
|
|
167
294
|
|
|
168
|
-
const
|
|
295
|
+
const _NavWithThreeRows = args => {
|
|
169
296
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
showProfile: true,
|
|
178
|
-
showSearch: false
|
|
297
|
+
firstRow: rowOneOfTwo,
|
|
298
|
+
firstRowClasses: firstRowClasses,
|
|
299
|
+
secondRow: rowTwoOfTwo,
|
|
300
|
+
secondRowClasses: secondRowClasses,
|
|
301
|
+
thirdRow: thirdRow,
|
|
302
|
+
thirdRowClasses: thirdRowClasses,
|
|
303
|
+
mobileItems: mobileItems
|
|
179
304
|
});
|
|
180
305
|
};
|
|
181
306
|
|
|
182
|
-
exports.
|
|
307
|
+
exports._NavWithThreeRows = _NavWithThreeRows;
|
|
183
308
|
|
|
184
|
-
const
|
|
309
|
+
const WithTwoRowsAsSideBar = args => {
|
|
185
310
|
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
icon: _user.default,
|
|
193
|
-
showProfile: true,
|
|
194
|
-
showSearch: true
|
|
311
|
+
firstRow: rowOneOfTwo,
|
|
312
|
+
firstRowClasses: firstRowClasses,
|
|
313
|
+
secondRow: rowTwoOfTwo,
|
|
314
|
+
secondRowClasses: secondRowClasses,
|
|
315
|
+
mobileItems: mobileItems,
|
|
316
|
+
asSideBar: true
|
|
195
317
|
});
|
|
196
318
|
};
|
|
197
319
|
|
|
198
|
-
exports.
|
|
320
|
+
exports.WithTwoRowsAsSideBar = WithTwoRowsAsSideBar;
|
|
@@ -7,17 +7,13 @@ exports.default = void 0;
|
|
|
7
7
|
|
|
8
8
|
require("core-js/modules/web.dom-collections.iterator.js");
|
|
9
9
|
|
|
10
|
-
require("core-js/modules/es.regexp.exec.js");
|
|
11
|
-
|
|
12
|
-
require("core-js/modules/es.string.split.js");
|
|
13
|
-
|
|
14
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
11
|
|
|
16
|
-
var
|
|
12
|
+
var _Column = _interopRequireDefault(require("../Column"));
|
|
17
13
|
|
|
18
|
-
var
|
|
14
|
+
var _logoWhite = _interopRequireDefault(require("../../Assets/Images/logoWhite.png"));
|
|
19
15
|
|
|
20
|
-
var
|
|
16
|
+
var _Icon = _interopRequireDefault(require("../Icon"));
|
|
21
17
|
|
|
22
18
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
19
|
|
|
@@ -25,18 +21,15 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
21
|
|
|
26
22
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
23
|
|
|
28
|
-
const
|
|
24
|
+
const Nav = _ref => {
|
|
29
25
|
let {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
showProfile,
|
|
38
|
-
icon,
|
|
39
|
-
logoImage,
|
|
26
|
+
firstRow,
|
|
27
|
+
firstRowClasses,
|
|
28
|
+
secondRow,
|
|
29
|
+
secondRowClasses,
|
|
30
|
+
thirdRow,
|
|
31
|
+
thirdRowClasses,
|
|
32
|
+
mobileItems,
|
|
40
33
|
navItemBorderColor,
|
|
41
34
|
navItemTextColor,
|
|
42
35
|
navItemBgColor,
|
|
@@ -56,53 +49,9 @@ const Header = _ref => {
|
|
|
56
49
|
mobileNavButtonColor,
|
|
57
50
|
hoverMobileNavButtonBgColor,
|
|
58
51
|
hoverMobileNavButtonColor,
|
|
59
|
-
|
|
52
|
+
asSideBar
|
|
60
53
|
} = _ref;
|
|
61
|
-
const
|
|
62
|
-
const [mobileMenuState, setmobileMenuState] = (0, _react.useState)(false);
|
|
63
|
-
const profileLinks = [{
|
|
64
|
-
name: 'PROFILE ITEM 1',
|
|
65
|
-
reference: '/'
|
|
66
|
-
}, {
|
|
67
|
-
name: 'PROFILE ITEM 2',
|
|
68
|
-
reference: '/'
|
|
69
|
-
}, {
|
|
70
|
-
name: 'PROFILE ITEM 3',
|
|
71
|
-
reference: '/'
|
|
72
|
-
}, {
|
|
73
|
-
name: 'PROFILE ITEM 4',
|
|
74
|
-
reference: '/'
|
|
75
|
-
}];
|
|
76
|
-
const pathArray = window.location.pathname.split('/');
|
|
77
|
-
let slug = pathArray[pathArray.length - 1];
|
|
78
|
-
let containerClass = margin ? ' container mx-auto' : '';
|
|
79
|
-
let backgroundColor = bgColor ? bgColor : 'grey';
|
|
80
|
-
let containsSearchOrProfile = showSearch ? showSearch : showProfile;
|
|
81
|
-
let flexType = containsSearchOrProfile ? 'flex-col w-full' : 'flex-1 ';
|
|
82
|
-
let combinedLogoClass = logoClass;
|
|
83
|
-
let navItemTopPadding = 'pt-2';
|
|
84
|
-
let combinedMobileLogoClass = logoClass + ' sm:hidden block flex-1 flex items-center justify-center sm:items-stretch ';
|
|
85
|
-
let linkContainerClass = 'flex-1 flex ';
|
|
86
|
-
let logoHeight = 16;
|
|
87
|
-
|
|
88
|
-
if (!alignNavAndLogo) {
|
|
89
|
-
combinedLogoClass += ' flex justify-center ';
|
|
90
|
-
} else {
|
|
91
|
-
navItemTopPadding = containsSearchOrProfile ? '' : 'pt-' + logoHeight / 4;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
if (navPosition === '0') {
|
|
95
|
-
linkContainerClass += 'sm:justify-start';
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (navPosition === '1') {
|
|
99
|
-
linkContainerClass += 'sm:justify-center';
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
if (navPosition === '2') {
|
|
103
|
-
linkContainerClass += 'sm:justify-end';
|
|
104
|
-
} //---------- Styling ---------------
|
|
105
|
-
|
|
54
|
+
const [mobileMenuState, setmobileMenuState] = (0, _react.useState)(false); //---------- Styling ---------------
|
|
106
55
|
|
|
107
56
|
const [styles, setStyles] = (0, _react.useState)({
|
|
108
57
|
'background-color': mobileNavButtonBgColor ? mobileNavButtonBgColor : 'white',
|
|
@@ -124,23 +73,38 @@ const Header = _ref => {
|
|
|
124
73
|
}; //-----------------------------------
|
|
125
74
|
|
|
126
75
|
|
|
76
|
+
const [sideNavWidth, setSideNavWidth] = (0, _react.useState)({
|
|
77
|
+
'width': '0px'
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
const openSideNav = () => {
|
|
81
|
+
setSideNavWidth({
|
|
82
|
+
'width': '200px',
|
|
83
|
+
'border-right': '3px solid black',
|
|
84
|
+
'padding-right': '10px'
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
const closeNav = () => {
|
|
89
|
+
setSideNavWidth({
|
|
90
|
+
'width': '0px'
|
|
91
|
+
});
|
|
92
|
+
};
|
|
93
|
+
|
|
127
94
|
return /*#__PURE__*/_react.default.createElement("nav", {
|
|
128
|
-
style: {
|
|
129
|
-
'background-color': backgroundColor
|
|
130
|
-
},
|
|
131
95
|
id: "nav",
|
|
132
|
-
className:
|
|
96
|
+
className: "bg-brand-primary"
|
|
133
97
|
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", {
|
|
134
98
|
id: "sm-nav",
|
|
135
|
-
className: "relative flex items-center
|
|
99
|
+
className: "relative flex items-center sm:hidden py-2"
|
|
136
100
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
137
101
|
id: "nav-collapse-btn-wrapper",
|
|
138
|
-
className: "absolute inset-y-0 left-
|
|
102
|
+
className: "absolute inset-y-0 left-2 flex items-center"
|
|
139
103
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
140
104
|
style: styles,
|
|
141
105
|
onMouseOver: () => setHoverState(true),
|
|
142
106
|
onMouseOut: () => setHoverState(false),
|
|
143
|
-
onClick: () => setmobileMenuState(!mobileMenuState),
|
|
107
|
+
onClick: asSideBar ? () => openSideNav() : () => setmobileMenuState(!mobileMenuState),
|
|
144
108
|
type: "button",
|
|
145
109
|
className: "inline-flex items-center justify-center p-2 rounded-md focus:ring-2 focus:ring-inset focus:ring-white",
|
|
146
110
|
"aria-controls": "mobile-menu",
|
|
@@ -165,104 +129,64 @@ const Header = _ref => {
|
|
|
165
129
|
d: "M6 18L18 6M6 6l12 12"
|
|
166
130
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
167
131
|
id: "logo",
|
|
168
|
-
className:
|
|
132
|
+
className: "mx-auto"
|
|
169
133
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
170
134
|
className: "h-16 w-auto",
|
|
171
|
-
src:
|
|
135
|
+
src: _logoWhite.default,
|
|
172
136
|
alt: " Logo "
|
|
173
137
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
174
|
-
className: 'hidden sm:block items-center justify-between sm:items-stretch text-center '
|
|
138
|
+
className: 'hidden sm:block items-center justify-between sm:items-stretch text-center '
|
|
175
139
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
176
|
-
className:
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
140
|
+
className: 'flex ' + firstRowClasses
|
|
141
|
+
}, firstRow && firstRow.map(rowItem => {
|
|
142
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
143
|
+
className: 'h-16 ' + rowItem.columnClasses,
|
|
144
|
+
xs: rowItem.xsColumnWidth,
|
|
145
|
+
sm: rowItem.smColumnWidth,
|
|
146
|
+
md: rowItem.columnWidth,
|
|
147
|
+
lg: rowItem.lgColumnWidth
|
|
148
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
149
|
+
className: rowItem.classNames
|
|
150
|
+
}, rowItem.component));
|
|
184
151
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
-
className: 'flex ' +
|
|
186
|
-
},
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
linkClassNames: navItemLinkClassNames
|
|
217
|
-
});
|
|
218
|
-
})))))))), mobileMenuState && /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
-
className: "sm:hidden",
|
|
152
|
+
className: 'flex ' + secondRowClasses
|
|
153
|
+
}, secondRow && secondRow.map(rowItem => {
|
|
154
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
155
|
+
className: "h-16 ",
|
|
156
|
+
xs: rowItem.xsColumnWidth,
|
|
157
|
+
sm: rowItem.smColumnWidth,
|
|
158
|
+
md: rowItem.columnWidth
|
|
159
|
+
}, rowItem.component);
|
|
160
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
161
|
+
className: 'flex ' + thirdRowClasses
|
|
162
|
+
}, thirdRow && thirdRow.map(rowItem => {
|
|
163
|
+
return /*#__PURE__*/_react.default.createElement(_Column.default, {
|
|
164
|
+
className: "h-16",
|
|
165
|
+
xs: rowItem.xsColumnWidth,
|
|
166
|
+
sm: rowItem.smColumnWidth,
|
|
167
|
+
md: rowItem.columnWidth
|
|
168
|
+
}, rowItem.component);
|
|
169
|
+
})))), asSideBar ? /*#__PURE__*/_react.default.createElement("div", {
|
|
170
|
+
style: sideNavWidth,
|
|
171
|
+
className: "pt-12 bg-brand-primary fixed top-0 left-0 z-1 overflow-hidden h-full w-0 duration-500"
|
|
172
|
+
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Icon.default, {
|
|
173
|
+
className: "text-white absolute top-1 right-3",
|
|
174
|
+
onClick: () => closeNav(),
|
|
175
|
+
type: "times",
|
|
176
|
+
size: "2"
|
|
177
|
+
})), mobileItems && mobileItems.map(item => {
|
|
178
|
+
return /*#__PURE__*/_react.default.createElement("div", null, item.component);
|
|
179
|
+
})) :
|
|
180
|
+
/* dropdown */
|
|
181
|
+
mobileMenuState && /*#__PURE__*/_react.default.createElement("div", {
|
|
182
|
+
className: "sm:hidden py-2",
|
|
220
183
|
id: "mobile-menu"
|
|
221
|
-
},
|
|
222
|
-
className: "ml-4 py-4 flex flex-1",
|
|
223
|
-
placeholder: 'Search'
|
|
224
|
-
}), showProfile && /*#__PURE__*/_react.default.createElement("img", {
|
|
225
|
-
className: "ml-8 h-8 w-8 rounded-full",
|
|
226
|
-
src: user,
|
|
227
|
-
alt: ""
|
|
228
|
-
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
184
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
229
185
|
className: "px-2 pt-2 pb-3 space-y-1"
|
|
230
|
-
},
|
|
231
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
232
|
-
name: link.name,
|
|
233
|
-
url: link.reference,
|
|
234
|
-
borderColor: slug === link.reference ? hoverNavItemBorderColor : navItemBorderColor,
|
|
235
|
-
textColor: slug === link.reference ? hoverNavItemTextColor : navItemTextColor,
|
|
236
|
-
bgColor: slug === link.reference ? hoverNavItemBgColor : navItemBgColor,
|
|
237
|
-
hoverBorderColor: hoverNavItemBorderColor,
|
|
238
|
-
hoverTextColor: hoverNavItemTextColor,
|
|
239
|
-
hoverBgColor: hoverNavItemBgColor,
|
|
240
|
-
bordered: mobileNavItemBordered,
|
|
241
|
-
rounded: mobileNavItemRounded,
|
|
242
|
-
classNames: mobileNavItemClassNames,
|
|
243
|
-
linkClassNames: mobileNavItemLinkClassNames
|
|
244
|
-
});
|
|
245
|
-
}), /*#__PURE__*/_react.default.createElement("hr", {
|
|
246
|
-
style: {
|
|
247
|
-
'color': navItemTextColor
|
|
248
|
-
}
|
|
249
|
-
}), showProfile && profileLinks && profileLinks.map(link => {
|
|
250
|
-
return /*#__PURE__*/_react.default.createElement(_index3.default, {
|
|
251
|
-
name: link.name,
|
|
252
|
-
url: link.reference,
|
|
253
|
-
borderColor: slug === link.reference ? hoverNavItemBorderColor : navItemBorderColor,
|
|
254
|
-
textColor: slug === link.reference ? hoverNavItemTextColor : navItemTextColor,
|
|
255
|
-
bgColor: slug === link.reference ? hoverNavItemBgColor : navItemBgColor,
|
|
256
|
-
hoverBorderColor: hoverNavItemBorderColor,
|
|
257
|
-
hoverTextColor: hoverNavItemTextColor,
|
|
258
|
-
hoverBgColor: hoverNavItemBgColor,
|
|
259
|
-
bordered: mobileNavItemBordered,
|
|
260
|
-
rounded: mobileNavItemRounded,
|
|
261
|
-
classNames: mobileNavItemClassNames,
|
|
262
|
-
linkClassNames: mobileNavItemLinkClassNames
|
|
263
|
-
});
|
|
186
|
+
}, mobileItems && mobileItems.map(item => {
|
|
187
|
+
return /*#__PURE__*/_react.default.createElement("div", null, item.component);
|
|
264
188
|
}))));
|
|
265
189
|
};
|
|
266
190
|
|
|
267
|
-
var _default =
|
|
191
|
+
var _default = Nav;
|
|
268
192
|
exports.default = _default;
|
|
@@ -19,11 +19,18 @@ const Profile = _ref => {
|
|
|
19
19
|
alignRight,
|
|
20
20
|
alignLeft,
|
|
21
21
|
userImage,
|
|
22
|
-
|
|
22
|
+
imageHeight,
|
|
23
|
+
imageWidth,
|
|
24
|
+
classNames,
|
|
25
|
+
rounded
|
|
23
26
|
} = _ref;
|
|
24
27
|
let profileAlignment = alignRight ? ' float-right ' : alignLeft ? ' float-left ' : '';
|
|
25
28
|
let dropdownAlignement = alignRight ? ' mt-16 -mr-16 ' : alignLeft ? ' mt-16 -ml-16 ' : '';
|
|
26
29
|
let dropdownTextAlignement = alignRight ? ' ' : alignLeft ? ' ' : 'text-center';
|
|
30
|
+
const height = imageHeight && 'h-' + imageHeight;
|
|
31
|
+
const width = imageWidth && 'w-' + imageWidth;
|
|
32
|
+
const round = rounded ? 'rounded-full' : '';
|
|
33
|
+
const classes = width + ' ' + height + ' ' + round;
|
|
27
34
|
const [profileState, setProfileState] = (0, _react.useState)(false);
|
|
28
35
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
29
36
|
className: 'text-center ' + classNames
|
|
@@ -34,13 +41,13 @@ const Profile = _ref => {
|
|
|
34
41
|
type: "button",
|
|
35
42
|
className: "bg-gray-800 flex rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white"
|
|
36
43
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
37
|
-
className:
|
|
44
|
+
className: classes,
|
|
38
45
|
src: userImage,
|
|
39
46
|
alt: ""
|
|
40
47
|
})))), profileState && /*#__PURE__*/_react.default.createElement("div", {
|
|
41
48
|
className: dropdownTextAlignement
|
|
42
49
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
className: "w-48 sm:inline-block shadow-lg " + profileAlignment + dropdownAlignement
|
|
50
|
+
className: "w-48 sm:inline-block shadow-lg bg-brand-highlight text-white z-10 hover:bg-brand-border-light hover:text-black " + profileAlignment + dropdownAlignement
|
|
44
51
|
}, profileLinks && profileLinks.map((link, i) => {
|
|
45
52
|
return /*#__PURE__*/_react.default.createElement("a", {
|
|
46
53
|
href: link.link,
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.default = exports._Search = exports.SearchWithRightIcon = exports.SearchWithLeftIcon = exports.SearchWithLabel = exports.SearchWithBothIcons = void 0;
|
|
6
|
+
exports.default = exports._Search = exports.SearchWithRightIcon = exports.SearchWithLeftIcon = exports.SearchWithLabel = exports.SearchWithBothIconsAndLabel = exports.SearchWithBothIcons = void 0;
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
@@ -108,4 +108,15 @@ const SearchWithBothIcons = args => {
|
|
|
108
108
|
});
|
|
109
109
|
};
|
|
110
110
|
|
|
111
|
-
exports.SearchWithBothIcons = SearchWithBothIcons;
|
|
111
|
+
exports.SearchWithBothIcons = SearchWithBothIcons;
|
|
112
|
+
|
|
113
|
+
const SearchWithBothIconsAndLabel = args => {
|
|
114
|
+
return /*#__PURE__*/_react.default.createElement(_index.default, {
|
|
115
|
+
placeholder: args.placeholder,
|
|
116
|
+
leftIcon: args.leftIcon,
|
|
117
|
+
rightIcon: args.rightIcon,
|
|
118
|
+
text: "Search"
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
exports.SearchWithBothIconsAndLabel = SearchWithBothIconsAndLabel;
|
|
@@ -34,11 +34,11 @@ const Search = _ref => {
|
|
|
34
34
|
}, text && /*#__PURE__*/_react.default.createElement("h2", {
|
|
35
35
|
className: "font-base-lg pt-2"
|
|
36
36
|
}, text), /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className: "relative block"
|
|
37
|
+
className: "relative block w-full"
|
|
38
38
|
}, leftIcon && /*#__PURE__*/_react.default.createElement("span", {
|
|
39
39
|
className: "absolute inset-y-0 left-5 flex items-center pl-2"
|
|
40
40
|
}, iconLeft), /*#__PURE__*/_react.default.createElement("input", {
|
|
41
|
-
className: "
|
|
41
|
+
className: "w-full border-2 border-gray-300 placeholder:italic placeholder:text-gray-400 rounded-md py-1 focus:outline-none focus:border-sky-500 focus:ring-sky-500 focus:ring-1 " + leftPadding,
|
|
42
42
|
onChange: e => _onChange(e.target.value),
|
|
43
43
|
placeholder: placeholder,
|
|
44
44
|
type: "text",
|
|
@@ -15,8 +15,12 @@ const TextAndTitle = _ref => {
|
|
|
15
15
|
text,
|
|
16
16
|
title,
|
|
17
17
|
bgColor,
|
|
18
|
-
textColor
|
|
18
|
+
textColor,
|
|
19
|
+
titleClass,
|
|
20
|
+
textClass
|
|
19
21
|
} = _ref;
|
|
22
|
+
const titleClasses = titleClass + ' text-2xl';
|
|
23
|
+
const textClasses = textClass + '';
|
|
20
24
|
const classes = classNames + ' text-center'; //---------- Styling ---------------
|
|
21
25
|
|
|
22
26
|
const styles = {
|
|
@@ -28,8 +32,10 @@ const TextAndTitle = _ref => {
|
|
|
28
32
|
style: styles,
|
|
29
33
|
className: classes
|
|
30
34
|
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
31
|
-
className:
|
|
32
|
-
}, title), /*#__PURE__*/_react.default.createElement("p",
|
|
35
|
+
className: titleClasses
|
|
36
|
+
}, title), /*#__PURE__*/_react.default.createElement("p", {
|
|
37
|
+
className: textClasses
|
|
38
|
+
}, text));
|
|
33
39
|
};
|
|
34
40
|
|
|
35
41
|
var _default = TextAndTitle;
|