@micromag/element-text 0.3.814 → 0.3.820

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.
Files changed (2) hide show
  1. package/es/index.js +7 -1
  2. package/package.json +3 -3
package/es/index.js CHANGED
@@ -5,13 +5,14 @@ import PropTypes from 'prop-types';
5
5
  import React, { useId } from 'react';
6
6
  import { PropTypes as PropTypes$1 } from '@micromag/core';
7
7
  import { LinkStyle, HighlightStyle } from '@micromag/core/components';
8
- import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromMargin } from '@micromag/core/utils';
8
+ import { getStyleFromLink, getStyleFromHighlight, getStyleFromText, getStyleFromBox, getStyleFromMargin } from '@micromag/core/utils';
9
9
 
10
10
  var styles = {"container":"micromag-element-text-container","showEmpty":"micromag-element-text-showEmpty","withLineClamp":"micromag-element-text-withLineClamp"};
11
11
 
12
12
  var propTypes = {
13
13
  body: PropTypes.string,
14
14
  textStyle: PropTypes$1.textStyle,
15
+ boxStyle: PropTypes$1.boxStyle,
15
16
  linksStyle: PropTypes$1.textStyle,
16
17
  margin: PropTypes$1.margin,
17
18
  lineClamp: PropTypes.number,
@@ -26,6 +27,7 @@ var propTypes = {
26
27
  var defaultProps = {
27
28
  body: null,
28
29
  textStyle: null,
30
+ boxStyle: null,
29
31
  linksStyle: null,
30
32
  margin: null,
31
33
  lineClamp: null,
@@ -38,6 +40,7 @@ var defaultProps = {
38
40
  var Text = function Text(_ref) {
39
41
  var body = _ref.body,
40
42
  textStyle = _ref.textStyle,
43
+ boxStyle = _ref.boxStyle,
41
44
  linksStyle = _ref.linksStyle,
42
45
  margin = _ref.margin,
43
46
  lineClamp = _ref.lineClamp,
@@ -62,6 +65,9 @@ var Text = function Text(_ref) {
62
65
  if (textStyle !== null) {
63
66
  finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromText(textStyle));
64
67
  }
68
+ if (boxStyle !== null) {
69
+ finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromBox(boxStyle));
70
+ }
65
71
  if (lineClamp !== null) {
66
72
  finalStyle.WebkitLineClamp = lineClamp;
67
73
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@micromag/element-text",
3
- "version": "0.3.814",
3
+ "version": "0.3.820",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "keywords": [
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "dependencies": {
61
61
  "@babel/runtime": "^7.13.10",
62
- "@micromag/core": "^0.3.814",
62
+ "@micromag/core": "^0.3.820",
63
63
  "classnames": "^2.2.6",
64
64
  "prop-types": "^15.7.2",
65
65
  "react-intl": "^6.6.4",
@@ -69,5 +69,5 @@
69
69
  "access": "public",
70
70
  "registry": "https://registry.npmjs.org/"
71
71
  },
72
- "gitHead": "96d19c8ede8dc2e8c051ba118975258e061a8da2"
72
+ "gitHead": "c4ef0ae4055720a367551328e824ad3b111e4c9f"
73
73
  }