@mvf/external-components 3.6.1-dev.4 → 3.7.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,7 @@ import { IThemes } from './themes';
|
|
3
3
|
type StoryThemeWrapperType = React.FunctionComponent<{
|
4
4
|
children: React.ReactNode;
|
5
5
|
themeType: keyof IThemes;
|
6
|
-
|
6
|
+
fontSizeMultiplier?: number;
|
7
7
|
}>;
|
8
8
|
declare const StoryThemeWrapper: StoryThemeWrapperType;
|
9
9
|
export default StoryThemeWrapper;
|
@@ -15,8 +15,8 @@ var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
|
|
15
15
|
var react_1 = require("@emotion/react");
|
16
16
|
var themes_1 = require("./themes");
|
17
17
|
var StoryThemeWrapper = function (_a) {
|
18
|
-
var children = _a.children, themeType = _a.themeType, _b = _a.
|
19
|
-
var theme = (0, themes_1.getThemeWithFontMultiplier)(themeType,
|
18
|
+
var children = _a.children, themeType = _a.themeType, _b = _a.fontSizeMultiplier, fontSizeMultiplier = _b === void 0 ? 1 : _b;
|
19
|
+
var theme = (0, themes_1.getThemeWithFontMultiplier)(themeType, fontSizeMultiplier);
|
20
20
|
return (0, jsx_runtime_1.jsx)(react_1.ThemeProvider, __assign({ theme: theme }, { children: children }));
|
21
21
|
};
|
22
22
|
exports.default = StoryThemeWrapper;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StoryThemeWrapper.js","sourceRoot":"","sources":["../../src/Themes/StoryThemeWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,wCAA+C;AAC/C,mCAA+D;AAQ/D,IAAM,iBAAiB,GAA0B,UAAC,EAIjD;QAHC,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,
|
1
|
+
{"version":3,"file":"StoryThemeWrapper.js","sourceRoot":"","sources":["../../src/Themes/StoryThemeWrapper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,wCAA+C;AAC/C,mCAA+D;AAQ/D,IAAM,iBAAiB,GAA0B,UAAC,EAIjD;QAHC,QAAQ,cAAA,EACR,SAAS,eAAA,EACT,0BAAsB,EAAtB,kBAAkB,mBAAG,CAAC,KAAA;IAEtB,IAAM,KAAK,GAAG,IAAA,mCAA0B,EAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC;IAExE,OAAO,uBAAC,qBAAa,aAAC,KAAK,EAAE,KAAK,gBAAG,QAAQ,IAAiB,CAAC;AACjE,CAAC,CAAC;AAEF,kBAAe,iBAAiB,CAAC"}
|
package/Themes/themes.d.ts
CHANGED
@@ -867,7 +867,7 @@ declare const themes: {
|
|
867
867
|
};
|
868
868
|
export type ITheme = typeof customTheme;
|
869
869
|
export type IThemes = typeof themes;
|
870
|
-
export declare const getThemeWithFontMultiplier: (theme: keyof IThemes,
|
870
|
+
export declare const getThemeWithFontMultiplier: (theme: keyof IThemes, fontSizeMultiplier?: number) => import("@mui/material").Theme & {
|
871
871
|
mvf: {
|
872
872
|
border: {
|
873
873
|
width: {
|
package/Themes/themes.js
CHANGED
@@ -38,27 +38,27 @@ var themes = {
|
|
38
38
|
rhubarb: rhubarbTheme_1.default,
|
39
39
|
custom: themeCreator_1.customTheme,
|
40
40
|
};
|
41
|
-
var getThemeWithFontMultiplier = function (theme,
|
42
|
-
if (
|
41
|
+
var getThemeWithFontMultiplier = function (theme, fontSizeMultiplier) {
|
42
|
+
if (fontSizeMultiplier === void 0) { fontSizeMultiplier = 1; }
|
43
43
|
if (theme === 'atlantic') {
|
44
|
-
return (0, themeCreator_1.default)(atlanticTheme_1.atlanticPalette, atlanticTheme_1.default.typography.fontFamily,
|
44
|
+
return (0, themeCreator_1.default)(atlanticTheme_1.atlanticPalette, atlanticTheme_1.default.typography.fontFamily, fontSizeMultiplier);
|
45
45
|
}
|
46
46
|
if (theme === 'chameleon') {
|
47
|
-
return (0, themeCreator_1.default)(chameleonTheme_1.chameleonPalette, chameleonTheme_1.default.typography.fontFamily,
|
47
|
+
return (0, themeCreator_1.default)(chameleonTheme_1.chameleonPalette, chameleonTheme_1.default.typography.fontFamily, fontSizeMultiplier);
|
48
48
|
}
|
49
49
|
if (theme === 'gowizard') {
|
50
|
-
return (0, themeCreator_1.default)(gowizardTheme_1.gowizardPalette, gowizardTheme_1.default.typography.fontFamily,
|
50
|
+
return (0, themeCreator_1.default)(gowizardTheme_1.gowizardPalette, gowizardTheme_1.default.typography.fontFamily, fontSizeMultiplier);
|
51
51
|
}
|
52
52
|
if (theme === 'indigo') {
|
53
|
-
return (0, themeCreator_1.default)(indigoTheme_1.indigoPalette, indigoTheme_1.default.typography.fontFamily,
|
53
|
+
return (0, themeCreator_1.default)(indigoTheme_1.indigoPalette, indigoTheme_1.default.typography.fontFamily, fontSizeMultiplier);
|
54
54
|
}
|
55
55
|
if (theme === 'rhubarb') {
|
56
|
-
return (0, themeCreator_1.default)(rhubarbTheme_1.rhubarbPalette, rhubarbTheme_1.default.typography.fontFamily,
|
56
|
+
return (0, themeCreator_1.default)(rhubarbTheme_1.rhubarbPalette, rhubarbTheme_1.default.typography.fontFamily, fontSizeMultiplier);
|
57
57
|
}
|
58
58
|
if (theme === 'custom') {
|
59
|
-
return (0, themeCreator_1.default)(themeCreator_1.customPalette, themeCreator_1.customTheme.typography.fontFamily,
|
59
|
+
return (0, themeCreator_1.default)(themeCreator_1.customPalette, themeCreator_1.customTheme.typography.fontFamily, fontSizeMultiplier);
|
60
60
|
}
|
61
|
-
return (0, themeCreator_1.default)(chameleonTheme_1.chameleonPalette, chameleonTheme_1.default.typography.fontFamily,
|
61
|
+
return (0, themeCreator_1.default)(chameleonTheme_1.chameleonPalette, chameleonTheme_1.default.typography.fontFamily, fontSizeMultiplier);
|
62
62
|
};
|
63
63
|
exports.getThemeWithFontMultiplier = getThemeWithFontMultiplier;
|
64
64
|
exports.default = themes;
|
package/Themes/themes.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/Themes/themes.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA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