dibk-design 0.4.2 → 0.4.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.
|
@@ -78,7 +78,7 @@ var Button = /*#__PURE__*/function (_React$Component) {
|
|
|
78
78
|
key: "render",
|
|
79
79
|
value: function render() {
|
|
80
80
|
var themeStyle = this.props.theme ? this.getThemeStyle(this.props.theme, this.props.color) : null;
|
|
81
|
-
var className = "".concat(_ButtonModule.default.button, " ").concat(_ButtonModule.default[this.props.color], " ").concat(_ButtonModule.default[this.props.size], " ").concat(this.getArrowClass(), " ").concat(this.props.theme ? _ButtonModule.default.hasTheme : '');
|
|
81
|
+
var className = "".concat(_ButtonModule.default.button, " ").concat(_ButtonModule.default[this.props.color], " ").concat(_ButtonModule.default[this.props.size], " ").concat(this.getArrowClass(), " ").concat(this.props.theme ? _ButtonModule.default.hasTheme : '', " ").concat(this.props.noHover ? _ButtonModule.default.noHover : '');
|
|
82
82
|
return /*#__PURE__*/_react.default.createElement("button", _extends({}, this.props, {
|
|
83
83
|
className: className,
|
|
84
84
|
style: themeStyle
|
|
@@ -96,13 +96,15 @@ Button.propTypes = {
|
|
|
96
96
|
size: _propTypes.default.oneOf(['small', 'regular']),
|
|
97
97
|
arrow: _propTypes.default.oneOf(['left', 'right']),
|
|
98
98
|
theme: _propTypes.default.object,
|
|
99
|
-
disabled: _propTypes.default.bool
|
|
99
|
+
disabled: _propTypes.default.bool,
|
|
100
|
+
noHover: _propTypes.default.bool
|
|
100
101
|
};
|
|
101
102
|
Button.defaultProps = {
|
|
102
103
|
content: 'button',
|
|
103
104
|
color: 'default',
|
|
104
105
|
size: 'regular',
|
|
105
|
-
disabled: false
|
|
106
|
+
disabled: false,
|
|
107
|
+
noHover: false
|
|
106
108
|
};
|
|
107
109
|
var _default = Button;
|
|
108
110
|
exports.default = _default;
|
|
@@ -16,6 +16,15 @@ Regular buttons with arrow example:
|
|
|
16
16
|
<Button content="Click me" color="primary" arrow="right" disabled="disabled" />
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Regular buttons without hover effect example:
|
|
20
|
+
|
|
21
|
+
```js
|
|
22
|
+
<Button content="Click me" color="default" noHover />
|
|
23
|
+
<Button content="Click me" color="primary" noHover />
|
|
24
|
+
<Button content="Click me" color="default" noHover disabled="disabled" />
|
|
25
|
+
<Button content="Click me" color="primary" noHover disabled="disabled" />
|
|
26
|
+
```
|
|
27
|
+
|
|
19
28
|
Small buttons example:
|
|
20
29
|
|
|
21
30
|
```js
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
background-color: #fff;
|
|
76
76
|
color: $color-primary;
|
|
77
77
|
&:not(:local(.hasTheme)) {
|
|
78
|
-
&:hover,
|
|
78
|
+
&:hover:not(:local(.noHover)),
|
|
79
79
|
&:active {
|
|
80
80
|
background-color: $color-primary;
|
|
81
81
|
color: #fff;
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
background-color: $color-primary;
|
|
92
92
|
color: #fff;
|
|
93
93
|
&:not(:local(.hasTheme)) {
|
|
94
|
-
&:hover,
|
|
94
|
+
&:hover:not(:local(.noHover)),
|
|
95
95
|
&:active {
|
|
96
96
|
background-color: #fff;
|
|
97
97
|
color: $color-primary;
|
|
@@ -121,6 +121,10 @@
|
|
|
121
121
|
opacity: 0.6;
|
|
122
122
|
color: #afaba8;
|
|
123
123
|
border: 1px solid #e5e3e1;
|
|
124
|
+
&:before,
|
|
125
|
+
&:after {
|
|
126
|
+
border-color: #afaba8;
|
|
127
|
+
}
|
|
124
128
|
}
|
|
125
129
|
&:before,
|
|
126
130
|
&:after {
|