@cloudflare/component-button 3.1.9 → 3.1.10
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/CHANGELOG.md +8 -0
- package/es/TextButton.js +4 -5
- package/lib/TextButton.js +4 -7
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [3.1.10](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-button@3.1.9...@cloudflare/component-button@3.1.10) (2022-04-15)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @cloudflare/component-button
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [3.1.9](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-button@3.1.8...@cloudflare/component-button@3.1.9) (2022-04-13)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @cloudflare/component-button
|
package/es/TextButton.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import PropTypes from 'prop-types';
|
|
2
1
|
import { createStyledComponent } from '@cloudflare/style-container';
|
|
2
|
+
import { isDarkMode } from '@cloudflare/style-const';
|
|
3
3
|
const TextButton = createStyledComponent(({
|
|
4
4
|
theme
|
|
5
5
|
}) => ({
|
|
@@ -19,16 +19,15 @@ const TextButton = createStyledComponent(({
|
|
|
19
19
|
fontWeight: 400,
|
|
20
20
|
outline: 'none',
|
|
21
21
|
overflow: 'hidden',
|
|
22
|
+
textUnderlineOffset: 4,
|
|
22
23
|
':hover': {
|
|
23
|
-
color: theme.colors.orange[6]
|
|
24
|
+
color: isDarkMode() ? theme.colors.orange[6] : theme.colors.blue[2],
|
|
25
|
+
textDecoration: 'underline'
|
|
24
26
|
},
|
|
25
27
|
':focus-visible': {
|
|
26
28
|
outline: '-webkit-focus-ring-color auto 1px',
|
|
27
29
|
outlineOffset: '1px'
|
|
28
30
|
}
|
|
29
31
|
}), 'button');
|
|
30
|
-
TextButton.propTypes = {
|
|
31
|
-
'data-testid': PropTypes.string
|
|
32
|
-
};
|
|
33
32
|
TextButton.displayName = 'TextButton';
|
|
34
33
|
export default TextButton;
|
package/lib/TextButton.js
CHANGED
|
@@ -5,11 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
|
|
10
8
|
var _styleContainer = require("@cloudflare/style-container");
|
|
11
9
|
|
|
12
|
-
|
|
10
|
+
var _styleConst = require("@cloudflare/style-const");
|
|
13
11
|
|
|
14
12
|
var TextButton = (0, _styleContainer.createStyledComponent)(function (_ref) {
|
|
15
13
|
var theme = _ref.theme;
|
|
@@ -30,8 +28,10 @@ var TextButton = (0, _styleContainer.createStyledComponent)(function (_ref) {
|
|
|
30
28
|
fontWeight: 400,
|
|
31
29
|
outline: 'none',
|
|
32
30
|
overflow: 'hidden',
|
|
31
|
+
textUnderlineOffset: 4,
|
|
33
32
|
':hover': {
|
|
34
|
-
color: theme.colors.orange[6]
|
|
33
|
+
color: (0, _styleConst.isDarkMode)() ? theme.colors.orange[6] : theme.colors.blue[2],
|
|
34
|
+
textDecoration: 'underline'
|
|
35
35
|
},
|
|
36
36
|
':focus-visible': {
|
|
37
37
|
outline: '-webkit-focus-ring-color auto 1px',
|
|
@@ -39,9 +39,6 @@ var TextButton = (0, _styleContainer.createStyledComponent)(function (_ref) {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}, 'button');
|
|
42
|
-
TextButton.propTypes = {
|
|
43
|
-
'data-testid': _propTypes.default.string
|
|
44
|
-
};
|
|
45
42
|
TextButton.displayName = 'TextButton';
|
|
46
43
|
var _default = TextButton;
|
|
47
44
|
exports.default = _default;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudflare/component-button",
|
|
3
3
|
"description": "Cloudflare Button Component",
|
|
4
|
-
"version": "3.1.
|
|
4
|
+
"version": "3.1.10",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
7
7
|
"author": "James Kyle <jkyle@cloudflare.com>",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"access": "public"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@cloudflare/component-icon": "^7.1.
|
|
16
|
-
"@cloudflare/style-const": "^5.2.
|
|
17
|
-
"@cloudflare/style-container": "^7.8.
|
|
15
|
+
"@cloudflare/component-icon": "^7.1.1",
|
|
16
|
+
"@cloudflare/style-const": "^5.2.24",
|
|
17
|
+
"@cloudflare/style-container": "^7.8.6",
|
|
18
18
|
"polished": "^4.1.4",
|
|
19
19
|
"prop-types": "^15.6.0"
|
|
20
20
|
},
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"test-coverage": "stratus test --coverage",
|
|
33
33
|
"test-watch": "stratus test --watch"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "cad36ed9a417079717b111fd23c74ae0bff42f29"
|
|
36
36
|
}
|