@mackin.com/styleguide 8.0.0-beta.14 → 8.0.0-beta.15
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/index.d.ts +4 -0
- package/index.js +6 -0
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -804,6 +804,10 @@ interface MackinTheme {
|
|
|
804
804
|
desktop: string;
|
|
805
805
|
tablet: string;
|
|
806
806
|
};
|
|
807
|
+
mediaQueries: {
|
|
808
|
+
desktop: string;
|
|
809
|
+
tablet: string;
|
|
810
|
+
};
|
|
807
811
|
}
|
|
808
812
|
/** Call this on your theme after messing with the props. It will re-build things that depend on sizes and colors. */
|
|
809
813
|
declare const calcDynamicThemeProps: <T extends MackinTheme>(theme: T) => void;
|
package/index.js
CHANGED
|
@@ -116,6 +116,8 @@ const calcDynamicThemeProps = (theme) => {
|
|
|
116
116
|
theme.controls.focusOutlineRequiredShadow = `0px 0px 4px 2px ${theme.colors.focusOutlineRequired}`;
|
|
117
117
|
theme.controls.dividerBorder = `2px solid ${theme.colors.divider}`;
|
|
118
118
|
theme.controls.inputErrorMinHeight = `calc(${theme.fonts.sizeSmall} * 1.5 + 4px)`;
|
|
119
|
+
theme.mediaQueries.desktop = `@media(min-width:${theme.breakpoints.desktop})`;
|
|
120
|
+
theme.mediaQueries.tablet = `@media(min-width:${theme.breakpoints.tablet})`;
|
|
119
121
|
};
|
|
120
122
|
const defaultTheme = {
|
|
121
123
|
colors: {
|
|
@@ -203,6 +205,10 @@ const defaultTheme = {
|
|
|
203
205
|
breakpoints: {
|
|
204
206
|
desktop: '800px',
|
|
205
207
|
tablet: '768px'
|
|
208
|
+
},
|
|
209
|
+
mediaQueries: {
|
|
210
|
+
desktop: '',
|
|
211
|
+
tablet: ''
|
|
206
212
|
}
|
|
207
213
|
};
|
|
208
214
|
calcDynamicThemeProps(defaultTheme);
|