@cloudflare/component-button 3.1.9 → 3.1.12

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 CHANGED
@@ -3,6 +3,30 @@
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.12](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-button@3.1.11...@cloudflare/component-button@3.1.12) (2022-04-25)
7
+
8
+ **Note:** Version bump only for package @cloudflare/component-button
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.1.11](http://stash.cfops.it:7999/fe/stratus/compare/@cloudflare/component-button@3.1.10...@cloudflare/component-button@3.1.11) (2022-04-20)
15
+
16
+ **Note:** Version bump only for package @cloudflare/component-button
17
+
18
+
19
+
20
+
21
+
22
+ ## [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)
23
+
24
+ **Note:** Version bump only for package @cloudflare/component-button
25
+
26
+
27
+
28
+
29
+
6
30
  ## [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
31
 
8
32
  **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
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
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.9",
4
+ "version": "3.1.12",
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.0",
16
- "@cloudflare/style-const": "^5.2.23",
17
- "@cloudflare/style-container": "^7.8.5",
15
+ "@cloudflare/component-icon": "^7.1.3",
16
+ "@cloudflare/style-const": "^5.2.25",
17
+ "@cloudflare/style-container": "^7.8.8",
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": "5241889d30e4525be18815f5c03082b4aa08132c"
35
+ "gitHead": "96d25714b65931f2e990d421f2f3fec239fd5b36"
36
36
  }