@micromag/element-button 0.2.405 → 0.3.0
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/es/index.js +3 -3
- package/lib/index.js +2 -2
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -5,13 +5,13 @@ import PropTypes$1 from 'prop-types';
|
|
|
5
5
|
import classNames from 'classnames';
|
|
6
6
|
import { PropTypes } from '@micromag/core';
|
|
7
7
|
import { Button as Button$1 } from '@micromag/core/components';
|
|
8
|
-
import { getStyleFromText,
|
|
8
|
+
import { getStyleFromText, getStyleFromBox } from '@micromag/core/utils';
|
|
9
9
|
|
|
10
10
|
var styles = {"container":"micromag-element-button-container","active":"micromag-element-button-active","focus":"micromag-element-button-focus","disabled":"micromag-element-button-disabled"};
|
|
11
11
|
|
|
12
12
|
var propTypes = {
|
|
13
13
|
textStyle: PropTypes.textStyle,
|
|
14
|
-
buttonStyle: PropTypes.
|
|
14
|
+
buttonStyle: PropTypes.boxStyle,
|
|
15
15
|
type: PropTypes$1.oneOf(['button', 'submit']),
|
|
16
16
|
disabled: PropTypes$1.bool,
|
|
17
17
|
focusable: PropTypes$1.bool,
|
|
@@ -52,7 +52,7 @@ var Button = function Button(_ref) {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
if (buttonStyle !== null) {
|
|
55
|
-
finalStyle = _objectSpread(_objectSpread({}, finalStyle),
|
|
55
|
+
finalStyle = _objectSpread(_objectSpread({}, finalStyle), getStyleFromBox(buttonStyle));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
return /*#__PURE__*/React.createElement(Button$1, {
|
package/lib/index.js
CHANGED
|
@@ -21,7 +21,7 @@ var styles = {"container":"micromag-element-button-container","active":"micromag
|
|
|
21
21
|
|
|
22
22
|
var propTypes = {
|
|
23
23
|
textStyle: core.PropTypes.textStyle,
|
|
24
|
-
buttonStyle: core.PropTypes.
|
|
24
|
+
buttonStyle: core.PropTypes.boxStyle,
|
|
25
25
|
type: PropTypes__default["default"].oneOf(['button', 'submit']),
|
|
26
26
|
disabled: PropTypes__default["default"].bool,
|
|
27
27
|
focusable: PropTypes__default["default"].bool,
|
|
@@ -62,7 +62,7 @@ var Button = function Button(_ref) {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
if (buttonStyle !== null) {
|
|
65
|
-
finalStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalStyle), utils.
|
|
65
|
+
finalStyle = _objectSpread__default["default"](_objectSpread__default["default"]({}, finalStyle), utils.getStyleFromBox(buttonStyle));
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
return /*#__PURE__*/React__default["default"].createElement(components.Button, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-button",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
|
-
"@micromag/core": "^0.
|
|
52
|
+
"@micromag/core": "^0.3.0",
|
|
53
53
|
"classnames": "^2.2.6",
|
|
54
54
|
"prop-types": "^15.7.2",
|
|
55
55
|
"react-intl": "^5.12.1",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"publishConfig": {
|
|
59
59
|
"access": "public"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "729bcf44dc4f99a2afec77fbdac86454e1cdf79f"
|
|
62
62
|
}
|