@rabex-kit/rabex-ui 0.2.63 → 0.2.64
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/rabex-ui.cjs.development.js +7 -5
- package/dist/rabex-ui.cjs.development.js.map +1 -1
- package/dist/rabex-ui.cjs.production.min.js +1 -1
- package/dist/rabex-ui.cjs.production.min.js.map +1 -1
- package/dist/rabex-ui.esm.js +7 -5
- package/dist/rabex-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -265,7 +265,7 @@ var AlertAction = function AlertAction(_ref) {
|
|
|
265
265
|
})));
|
|
266
266
|
};
|
|
267
267
|
|
|
268
|
-
var _excluded$1 = ["weight", "sx"];
|
|
268
|
+
var _excluded$1 = ["weight", "color", "sx"];
|
|
269
269
|
var fontWeight = {
|
|
270
270
|
bold: '700',
|
|
271
271
|
semiBold: '600',
|
|
@@ -289,19 +289,21 @@ var fontWeight = {
|
|
|
289
289
|
*/
|
|
290
290
|
var Typography = function Typography(_ref) {
|
|
291
291
|
var weight = _ref.weight,
|
|
292
|
+
color = _ref.color,
|
|
292
293
|
sx = _ref.sx,
|
|
293
294
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
294
|
-
|
|
295
|
+
var _useTheme = useTheme(),
|
|
296
|
+
palette = _useTheme.palette;
|
|
295
297
|
return React__default.createElement(MuiTypography, Object.assign({
|
|
296
298
|
sx: _extends({}, sx, {
|
|
297
299
|
fontWeight: weight ? fontWeight[weight] : 'regular'
|
|
298
|
-
})
|
|
300
|
+
}),
|
|
301
|
+
color: color || palette.textColor[900]
|
|
299
302
|
}, props));
|
|
300
303
|
};
|
|
301
304
|
Typography.defaultProps = {
|
|
302
305
|
variant: 'body1',
|
|
303
|
-
weight: 'regular'
|
|
304
|
-
color: 'textColor[900]'
|
|
306
|
+
weight: 'regular'
|
|
305
307
|
};
|
|
306
308
|
|
|
307
309
|
/**
|