@open-tender/utils 0.1.165 → 0.1.166
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/cjs/utils/theme.js +12 -1
- package/dist/esm/utils/theme.js +12 -1
- package/package.json +1 -1
package/dist/cjs/utils/theme.js
CHANGED
|
@@ -183,7 +183,17 @@ const makeMenuItems = (menuItems, lineHeight) => {
|
|
|
183
183
|
title: Object.assign(Object.assign({}, title), { fontSize: (0, exports.remsToPixels)(title.fontSize), fontSizeMobile: (0, exports.remsToPixels)(title.fontSizeMobile), lineHeight: fontSizeToLineHeight(lineHeight, title.fontSizeMobile), padding: boxRemsToPixels(title.padding), paddingMobile: boxRemsToPixels(title.paddingMobile) })
|
|
184
184
|
};
|
|
185
185
|
};
|
|
186
|
+
const makeLogo = (logo) => {
|
|
187
|
+
return {
|
|
188
|
+
marginTop: (0, exports.remsToPixels)(logo.marginTop),
|
|
189
|
+
marginTopMobile: (0, exports.remsToPixels)(logo.marginTopMobile),
|
|
190
|
+
width: (0, exports.remsToPixels)(logo.width),
|
|
191
|
+
widthMobile: (0, exports.remsToPixels)(logo.widthMobile)
|
|
192
|
+
};
|
|
193
|
+
};
|
|
186
194
|
const decorateTheme = (theme) => {
|
|
195
|
+
const logo = makeLogo(theme.logo);
|
|
196
|
+
const logoFooter = makeLogo(theme.logoFooter);
|
|
187
197
|
const fonts = makeFonts(theme.fonts, theme.lineHeight);
|
|
188
198
|
const lineHeight = (0, exports.makeLineHeight)(theme.lineHeight, fonts.sizes.main);
|
|
189
199
|
const layout = (0, exports.objRemsToPixels)(theme.layout);
|
|
@@ -196,7 +206,8 @@ const decorateTheme = (theme) => {
|
|
|
196
206
|
const item = makeItem(theme.item);
|
|
197
207
|
const categories = makeCategories(theme.categories);
|
|
198
208
|
const menuItems = makeMenuItems(theme.menuItems, theme.lineHeight);
|
|
199
|
-
return Object.assign(Object.assign({}, theme), {
|
|
209
|
+
return Object.assign(Object.assign({}, theme), { logo,
|
|
210
|
+
logoFooter, fonts: fonts, lineHeight, layout: layout, buttons: buttons, border, inputs: inputs, counts,
|
|
200
211
|
cards, welcome: welcome, item: item, categories,
|
|
201
212
|
menuItems });
|
|
202
213
|
};
|
package/dist/esm/utils/theme.js
CHANGED
|
@@ -174,7 +174,17 @@ const makeMenuItems = (menuItems, lineHeight) => {
|
|
|
174
174
|
title: Object.assign(Object.assign({}, title), { fontSize: remsToPixels(title.fontSize), fontSizeMobile: remsToPixels(title.fontSizeMobile), lineHeight: fontSizeToLineHeight(lineHeight, title.fontSizeMobile), padding: boxRemsToPixels(title.padding), paddingMobile: boxRemsToPixels(title.paddingMobile) })
|
|
175
175
|
};
|
|
176
176
|
};
|
|
177
|
+
const makeLogo = (logo) => {
|
|
178
|
+
return {
|
|
179
|
+
marginTop: remsToPixels(logo.marginTop),
|
|
180
|
+
marginTopMobile: remsToPixels(logo.marginTopMobile),
|
|
181
|
+
width: remsToPixels(logo.width),
|
|
182
|
+
widthMobile: remsToPixels(logo.widthMobile)
|
|
183
|
+
};
|
|
184
|
+
};
|
|
177
185
|
export const decorateTheme = (theme) => {
|
|
186
|
+
const logo = makeLogo(theme.logo);
|
|
187
|
+
const logoFooter = makeLogo(theme.logoFooter);
|
|
178
188
|
const fonts = makeFonts(theme.fonts, theme.lineHeight);
|
|
179
189
|
const lineHeight = makeLineHeight(theme.lineHeight, fonts.sizes.main);
|
|
180
190
|
const layout = objRemsToPixels(theme.layout);
|
|
@@ -187,7 +197,8 @@ export const decorateTheme = (theme) => {
|
|
|
187
197
|
const item = makeItem(theme.item);
|
|
188
198
|
const categories = makeCategories(theme.categories);
|
|
189
199
|
const menuItems = makeMenuItems(theme.menuItems, theme.lineHeight);
|
|
190
|
-
return Object.assign(Object.assign({}, theme), {
|
|
200
|
+
return Object.assign(Object.assign({}, theme), { logo,
|
|
201
|
+
logoFooter, fonts: fonts, lineHeight, layout: layout, buttons: buttons, border, inputs: inputs, counts,
|
|
191
202
|
cards, welcome: welcome, item: item, categories,
|
|
192
203
|
menuItems });
|
|
193
204
|
};
|
package/package.json
CHANGED