@councilbox/councilbox-ui 0.1.2 → 0.1.3
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/Header/Header.js +31 -20
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ var Header = function Header(_ref) {
|
|
|
29
29
|
logoLeftXS = _ref.logoLeftXS,
|
|
30
30
|
title = _ref.title,
|
|
31
31
|
lock = _ref.lock,
|
|
32
|
-
|
|
32
|
+
itemsDropDownMore = _ref.itemsDropDownMore,
|
|
33
33
|
logoRight = _ref.logoRight,
|
|
34
34
|
logoRightXS = _ref.logoRightXS,
|
|
35
35
|
finish = _ref.finish,
|
|
@@ -37,12 +37,12 @@ var Header = function Header(_ref) {
|
|
|
37
37
|
textFinishButton = _ref.textFinishButton,
|
|
38
38
|
companyName = _ref.companyName,
|
|
39
39
|
moreIcon = _ref.moreIcon,
|
|
40
|
-
|
|
40
|
+
iconButtonRight = _ref.iconButtonRight,
|
|
41
41
|
sectionCenter = _ref.sectionCenter,
|
|
42
|
-
itemsDropDown = _ref.itemsDropDown,
|
|
43
42
|
itemsDropDownUser = _ref.itemsDropDownUser,
|
|
44
43
|
lockIcon = _ref.lockIcon,
|
|
45
|
-
logoAndDropdownSeparate = _ref.logoAndDropdownSeparate
|
|
44
|
+
logoAndDropdownSeparate = _ref.logoAndDropdownSeparate,
|
|
45
|
+
backgroundIconButtonRight = _ref.backgroundIconButtonRight;
|
|
46
46
|
|
|
47
47
|
var _useWindowSize = (0, _useWindowSize2.default)(),
|
|
48
48
|
innerWidth = _useWindowSize.innerWidth,
|
|
@@ -54,7 +54,7 @@ var Header = function Header(_ref) {
|
|
|
54
54
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
55
55
|
className: "cbx-header-first-block",
|
|
56
56
|
style: {
|
|
57
|
-
minWidth: innerWidth > breakpoints.md ? '185px' : !logoLeft ? '145px' : '
|
|
57
|
+
minWidth: innerWidth > breakpoints.md ? '185px' : !logoLeft ? '145px' : '95px',
|
|
58
58
|
marginRight: innerWidth < breakpoints.md ? 'var(--spacing8)' : 'var(--spacing24)'
|
|
59
59
|
}
|
|
60
60
|
}, back && /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
@@ -69,7 +69,7 @@ var Header = function Header(_ref) {
|
|
|
69
69
|
className: "cbx-header-first-container-app-logo"
|
|
70
70
|
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
71
71
|
id: 'cbx-header-first-app-logo',
|
|
72
|
-
src: innerWidth < breakpoints.md ?
|
|
72
|
+
src: innerWidth < breakpoints.md ? logoLeftXS : logoLeft || logoLeft,
|
|
73
73
|
className: "App-logo",
|
|
74
74
|
alt: "logo"
|
|
75
75
|
})) : /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -109,7 +109,7 @@ var Header = function Header(_ref) {
|
|
|
109
109
|
fontSize: '18px',
|
|
110
110
|
lineHeight: '22px'
|
|
111
111
|
}
|
|
112
|
-
}, title)),
|
|
112
|
+
}, title)), itemsDropDownMore && /*#__PURE__*/_react.default.createElement("div", {
|
|
113
113
|
className: "cbx-header-second-container-more",
|
|
114
114
|
style: {
|
|
115
115
|
margin: innerWidth > breakpoints.md && '0 16px'
|
|
@@ -126,17 +126,18 @@ var Header = function Header(_ref) {
|
|
|
126
126
|
})
|
|
127
127
|
});
|
|
128
128
|
},
|
|
129
|
-
items:
|
|
129
|
+
items: itemsDropDownMore
|
|
130
130
|
})), finish && /*#__PURE__*/_react.default.createElement("div", {
|
|
131
131
|
className: "cbx-header-second-container-finish"
|
|
132
132
|
}, innerWidth < breakpoints.md ? /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
133
133
|
"aria-label": "",
|
|
134
134
|
id: 'cbx-header-button-logout',
|
|
135
135
|
className: "cbx-header-second-button-icon-logout cbx-header-button",
|
|
136
|
-
onClick: finish
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
onClick: finish,
|
|
137
|
+
icon: /*#__PURE__*/_react.default.createElement("i", {
|
|
138
|
+
className: "ri-logout-circle-r-line"
|
|
139
|
+
})
|
|
140
|
+
}) : /*#__PURE__*/_react.default.createElement(_ButtonBasic.default, {
|
|
140
141
|
id: 'cbx-header-button-logout',
|
|
141
142
|
variant: 'secondary',
|
|
142
143
|
style: {
|
|
@@ -157,7 +158,15 @@ var Header = function Header(_ref) {
|
|
|
157
158
|
className: "cbx-header-third-logo-right",
|
|
158
159
|
src: innerWidth < breakpoints.md ? logoRight : logoRightXS || logoRight,
|
|
159
160
|
alt: "logo"
|
|
160
|
-
})),
|
|
161
|
+
})), iconButtonRight && /*#__PURE__*/_react.default.createElement(_IconButton.default, {
|
|
162
|
+
"aria-label": "",
|
|
163
|
+
id: 'cbx-header-third-button-user',
|
|
164
|
+
className: "cbx-header-third-button-user cbx-header-button",
|
|
165
|
+
icon: iconButtonRight,
|
|
166
|
+
sx: {
|
|
167
|
+
background: backgroundIconButtonRight
|
|
168
|
+
}
|
|
169
|
+
}), itemsDropDownUser && /*#__PURE__*/_react.default.createElement("div", {
|
|
161
170
|
style: {
|
|
162
171
|
marginLeft: 'var(--spacing4)'
|
|
163
172
|
}
|
|
@@ -176,7 +185,7 @@ var Header = function Header(_ref) {
|
|
|
176
185
|
"aria-label": "",
|
|
177
186
|
id: 'cbx-header-third-button-user',
|
|
178
187
|
className: "cbx-header-third-button-user cbx-header-button",
|
|
179
|
-
icon:
|
|
188
|
+
icon: iconButtonRight || /*#__PURE__*/_react.default.createElement("i", {
|
|
180
189
|
className: "ri-user-3-line"
|
|
181
190
|
})
|
|
182
191
|
});
|
|
@@ -208,7 +217,7 @@ var Header = function Header(_ref) {
|
|
|
208
217
|
alt: "logo"
|
|
209
218
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
210
219
|
className: "cbx-header-third-button-user-logo "
|
|
211
|
-
},
|
|
220
|
+
}, iconButtonRight || /*#__PURE__*/_react.default.createElement("i", {
|
|
212
221
|
className: "ri-user-3-line"
|
|
213
222
|
}))),
|
|
214
223
|
onClick: finish
|
|
@@ -233,13 +242,14 @@ Header.propTypes = {
|
|
|
233
242
|
finish: _propTypes.default.func,
|
|
234
243
|
textFinishButton: _propTypes.default.string,
|
|
235
244
|
companyName: _propTypes.default.string,
|
|
236
|
-
|
|
245
|
+
iconButtonRight: _propTypes.default.string,
|
|
237
246
|
lockIcon: _propTypes.default.string,
|
|
247
|
+
backgroundIconButtonRight: _propTypes.default.string,
|
|
238
248
|
itemsDropDownUser: _propTypes.default.node,
|
|
239
|
-
|
|
249
|
+
itemsDropDownMore: _propTypes.default.node
|
|
240
250
|
};
|
|
241
251
|
Header.defaultProps = {
|
|
242
|
-
back:
|
|
252
|
+
back: undefined,
|
|
243
253
|
logoLeft: '',
|
|
244
254
|
logoLeftXS: '',
|
|
245
255
|
title: 'Lorem ipsum dolor sit amet. Leverage agile frameworks to provide',
|
|
@@ -252,10 +262,11 @@ Header.defaultProps = {
|
|
|
252
262
|
finish: Function.prototype,
|
|
253
263
|
textFinishButton: 'Finalizar Cita',
|
|
254
264
|
companyName: 'Entity 1 Entity 1 Entity 1',
|
|
255
|
-
|
|
265
|
+
iconButtonRight: '',
|
|
256
266
|
lockIcon: '',
|
|
267
|
+
backgroundIconButtonRight: '',
|
|
257
268
|
itemsDropDownUser: '',
|
|
258
|
-
|
|
269
|
+
itemsDropDownMore: ''
|
|
259
270
|
};
|
|
260
271
|
var _default = Header;
|
|
261
272
|
exports.default = _default;
|