@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.
@@ -261,7 +261,7 @@ var AlertAction = function AlertAction(_ref) {
261
261
  })));
262
262
  };
263
263
 
264
- var _excluded$1 = ["weight", "sx"];
264
+ var _excluded$1 = ["weight", "color", "sx"];
265
265
  var fontWeight = {
266
266
  bold: '700',
267
267
  semiBold: '600',
@@ -285,19 +285,21 @@ var fontWeight = {
285
285
  */
286
286
  var Typography = function Typography(_ref) {
287
287
  var weight = _ref.weight,
288
+ color = _ref.color,
288
289
  sx = _ref.sx,
289
290
  props = _objectWithoutPropertiesLoose(_ref, _excluded$1);
290
- // const { palette } = useTheme();
291
+ var _useTheme = useTheme(),
292
+ palette = _useTheme.palette;
291
293
  return React.createElement(MuiTypography, Object.assign({
292
294
  sx: _extends({}, sx, {
293
295
  fontWeight: weight ? fontWeight[weight] : 'regular'
294
- })
296
+ }),
297
+ color: color || palette.textColor[900]
295
298
  }, props));
296
299
  };
297
300
  Typography.defaultProps = {
298
301
  variant: 'body1',
299
- weight: 'regular',
300
- color: 'textColor[900]'
302
+ weight: 'regular'
301
303
  };
302
304
 
303
305
  /**