@panneau/filter-button 1.0.3-alpha.0 → 1.0.3
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 +9 -12
- package/lib/index.js +9 -12
- package/package.json +5 -5
package/es/index.js
CHANGED
@@ -29,19 +29,17 @@ var defaultProps = {
|
|
29
29
|
disableOutline: false,
|
30
30
|
className: null
|
31
31
|
};
|
32
|
-
|
33
32
|
var ButtonFilter = function ButtonFilter(_ref) {
|
34
33
|
var name = _ref.name,
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
34
|
+
label = _ref.label,
|
35
|
+
value = _ref.value,
|
36
|
+
href = _ref.href,
|
37
|
+
theme = _ref.theme,
|
38
|
+
activeTheme = _ref.activeTheme,
|
39
|
+
disableOutline = _ref.disableOutline,
|
40
|
+
onChange = _ref.onChange,
|
41
|
+
className = _ref.className,
|
42
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
45
43
|
var isActive = useMemo(function () {
|
46
44
|
return value !== null && (value === true || value === 'true' || value === 1 || value === '1');
|
47
45
|
}, [value]);
|
@@ -65,7 +63,6 @@ var ButtonFilter = function ButtonFilter(_ref) {
|
|
65
63
|
theme: isActive ? activeTheme : theme
|
66
64
|
})));
|
67
65
|
};
|
68
|
-
|
69
66
|
ButtonFilter.propTypes = propTypes;
|
70
67
|
ButtonFilter.defaultProps = defaultProps;
|
71
68
|
|
package/lib/index.js
CHANGED
@@ -42,19 +42,17 @@ var defaultProps = {
|
|
42
42
|
disableOutline: false,
|
43
43
|
className: null
|
44
44
|
};
|
45
|
-
|
46
45
|
var ButtonFilter = function ButtonFilter(_ref) {
|
47
46
|
var name = _ref.name,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
47
|
+
label = _ref.label,
|
48
|
+
value = _ref.value,
|
49
|
+
href = _ref.href,
|
50
|
+
theme = _ref.theme,
|
51
|
+
activeTheme = _ref.activeTheme,
|
52
|
+
disableOutline = _ref.disableOutline,
|
53
|
+
onChange = _ref.onChange,
|
54
|
+
className = _ref.className,
|
55
|
+
props = _objectWithoutProperties__default["default"](_ref, _excluded);
|
58
56
|
var isActive = React.useMemo(function () {
|
59
57
|
return value !== null && (value === true || value === 'true' || value === 1 || value === '1');
|
60
58
|
}, [value]);
|
@@ -78,7 +76,6 @@ var ButtonFilter = function ButtonFilter(_ref) {
|
|
78
76
|
theme: isActive ? activeTheme : theme
|
79
77
|
})));
|
80
78
|
};
|
81
|
-
|
82
79
|
ButtonFilter.propTypes = propTypes;
|
83
80
|
ButtonFilter.defaultProps = defaultProps;
|
84
81
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@panneau/filter-button",
|
3
|
-
"version": "1.0.3
|
3
|
+
"version": "1.0.3",
|
4
4
|
"description": "Button filter",
|
5
5
|
"keywords": [
|
6
6
|
"javascript"
|
@@ -53,14 +53,14 @@
|
|
53
53
|
},
|
54
54
|
"dependencies": {
|
55
55
|
"@babel/runtime": "^7.12.5",
|
56
|
-
"@panneau/core": "^1.0.3
|
57
|
-
"@panneau/element-button": "^1.0.3
|
58
|
-
"@panneau/themes": "^1.0.3
|
56
|
+
"@panneau/core": "^1.0.3",
|
57
|
+
"@panneau/element-button": "^1.0.3",
|
58
|
+
"@panneau/themes": "^1.0.3",
|
59
59
|
"classnames": "^2.2.6",
|
60
60
|
"prop-types": "^15.7.2"
|
61
61
|
},
|
62
62
|
"publishConfig": {
|
63
63
|
"access": "public"
|
64
64
|
},
|
65
|
-
"gitHead": "
|
65
|
+
"gitHead": "59e6842b1a768acb6fa826e6a6396d09e239c955"
|
66
66
|
}
|