@cloudflare/component-code 2.3.432 → 3.0.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.
Files changed (3) hide show
  1. package/CHANGELOG.md +813 -2618
  2. package/es/Code.js +23 -20
  3. package/package.json +7 -7
package/es/Code.js CHANGED
@@ -1,25 +1,28 @@
1
1
  import PropTypes from 'prop-types';
2
2
  import { createStyledComponent } from '@cloudflare/style-container';
3
- const Code = createStyledComponent(({
4
- theme,
5
- isCodeBlock,
6
- scroll
7
- }) => ({
8
- backgroundColor: 'gray.8',
9
- border: `1px solid ${theme.colors.gray[6]}`,
10
- borderRadius: 2,
11
- color: isCodeBlock ? 'gray.2' : 'red.3',
12
- display: isCodeBlock ? 'block' : 'inline-block',
13
- fontFamily: 'monaco, courier, monospace',
14
- fontSize: 2,
15
- mx: isCodeBlock ? 0 : 1,
16
- px: isCodeBlock ? 2 : 1,
17
- py: isCodeBlock ? 2 : 0,
18
- whiteSpace: isCodeBlock ? 'pre' : undefined,
19
- width: isCodeBlock ? '100%' : undefined,
20
- verticalAlign: 'baseline',
21
- overflow: scroll ? 'scroll' : 'auto'
22
- }), 'code');
3
+ var Code = createStyledComponent(_ref => {
4
+ var {
5
+ theme,
6
+ isCodeBlock,
7
+ scroll
8
+ } = _ref;
9
+ return {
10
+ backgroundColor: 'gray.8',
11
+ border: "1px solid ".concat(theme.colors.gray[6]),
12
+ borderRadius: 2,
13
+ color: isCodeBlock ? 'gray.2' : 'red.3',
14
+ display: isCodeBlock ? 'block' : 'inline-block',
15
+ fontFamily: 'monaco, courier, monospace',
16
+ fontSize: 2,
17
+ mx: isCodeBlock ? 0 : 1,
18
+ px: isCodeBlock ? 2 : 1,
19
+ py: isCodeBlock ? 2 : 0,
20
+ whiteSpace: isCodeBlock ? 'pre' : undefined,
21
+ width: isCodeBlock ? '100%' : undefined,
22
+ verticalAlign: 'baseline',
23
+ overflow: scroll ? 'scroll' : 'auto'
24
+ };
25
+ }, 'code');
23
26
  Code.propTypes = {
24
27
  isCodeBlock: PropTypes.bool,
25
28
  scroll: PropTypes.bool
package/package.json CHANGED
@@ -1,20 +1,21 @@
1
1
  {
2
2
  "name": "@cloudflare/component-code",
3
3
  "description": "Cloudflare Code Component",
4
- "version": "2.3.432",
4
+ "version": "3.0.0",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
7
7
  "author": "James Kyle <jkyle@cloudflare.com>",
8
8
  "license": "BSD-3-Clause",
9
9
  "publishConfig": {
10
- "registry": "https://registry.npmjs.org/",
11
- "access": "public"
10
+ "access": "public",
11
+ "main": "lib/index.js",
12
+ "module": "es/index.js"
12
13
  },
13
14
  "dependencies": {
14
- "@cloudflare/style-container": "^7.8.46",
15
15
  "prop-types": "^15.6.0"
16
16
  },
17
17
  "peerDependencies": {
18
+ "@cloudflare/style-container": "^7.9.0",
18
19
  "react": "^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"
19
20
  },
20
21
  "stratus": {
@@ -26,6 +27,5 @@
26
27
  "test": "stratus test",
27
28
  "test-coverage": "stratus test --coverage",
28
29
  "test-watch": "stratus test --watch"
29
- },
30
- "gitHead": "db9637310d476ef91a50177d026526ca40cb9330"
31
- }
30
+ }
31
+ }