@arcblock/ux 1.16.3 → 1.16.4
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/lib/CodeBlock/index.js +3 -1
- package/package.json +4 -4
- package/src/CodeBlock/index.js +9 -0
package/lib/CodeBlock/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _copyToClipboard = _interopRequireDefault(require("copy-to-clipboard"));
|
|
|
15
15
|
|
|
16
16
|
var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));
|
|
17
17
|
|
|
18
|
+
var _Colors = _interopRequireDefault(require("@arcblock/ux/lib/Colors"));
|
|
19
|
+
|
|
18
20
|
var _useMountedState = _interopRequireDefault(require("react-use/lib/useMountedState"));
|
|
19
21
|
|
|
20
22
|
var _highlight = _interopRequireDefault(require("highlight.js/lib/highlight"));
|
|
@@ -171,4 +173,4 @@ const fontFamily = 'source-code-pro, Menlo, Monaco, Consolas, Courier New, monos
|
|
|
171
173
|
const Pre = _styledComponents.default.pre.withConfig({
|
|
172
174
|
displayName: "CodeBlock__Pre",
|
|
173
175
|
componentId: "sc-1bpapaq-0"
|
|
174
|
-
})(["font-family:", ";display:block;font-size:14px;line-height:1.42857143;margin:0 0 32px;word-break:break-word;word-wrap:break-word;text-align:left;border-radius:5px;border:1px solid #dedede;background:#222;color:#fff;position:relative;.codeblock__inner{display:block;width:100%;max-height:46.25rem;overflow:scroll;}.copy-button{display:none;position:absolute;top:8px;right:24px;}&:hover{.copy-button{display:block;}}code{counter-reset:line;counter-increment:line;padding:16px;font-family:", ";color:#fff;*{font-family:", ";}}.hljs *{white-space:normal;}"], fontFamily, fontFamily, fontFamily);
|
|
176
|
+
})(["font-family:", ";display:block;font-size:14px;line-height:1.42857143;margin:0 0 32px;word-break:break-word;word-wrap:break-word;text-align:left;border-radius:5px;border:1px solid #dedede;background:#222;color:#fff;position:relative;.codeblock__inner{display:block;width:100%;max-height:46.25rem;overflow:scroll;}.copy-button{display:none;position:absolute;top:8px;right:24px;padding:4px;border-radius:4px;&,&:hover,&.Mui-disabled{background:", ";}}&:hover{.copy-button{display:block;}}code{counter-reset:line;counter-increment:line;padding:16px;font-family:", ";color:#fff;*{font-family:", ";}}.hljs *{white-space:normal;}"], fontFamily, _Colors.default.primary.main, fontFamily, fontFamily);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcblock/ux",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.4",
|
|
4
4
|
"description": "Common used react components for arcblock products",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -53,10 +53,10 @@
|
|
|
53
53
|
"react": ">=16.12.0",
|
|
54
54
|
"react-ga": "^2.7.0"
|
|
55
55
|
},
|
|
56
|
-
"gitHead": "
|
|
56
|
+
"gitHead": "86f91e1fde279db60831f972d2feca1c6e868ed0",
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@arcblock/icons": "^1.16.
|
|
59
|
-
"@arcblock/react-hooks": "^1.16.
|
|
58
|
+
"@arcblock/icons": "^1.16.4",
|
|
59
|
+
"@arcblock/react-hooks": "^1.16.4",
|
|
60
60
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
61
61
|
"@material-ui/core": "^4.12.3",
|
|
62
62
|
"@material-ui/icons": "4.11.2",
|
package/src/CodeBlock/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import PropTypes from 'prop-types';
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import Copy from 'copy-to-clipboard';
|
|
6
6
|
import Button from '@material-ui/core/IconButton';
|
|
7
|
+
import colors from '@arcblock/ux/lib/Colors';
|
|
7
8
|
import useMountedState from 'react-use/lib/useMountedState';
|
|
8
9
|
|
|
9
10
|
import hljs from 'highlight.js/lib/highlight';
|
|
@@ -126,6 +127,14 @@ const Pre = styled.pre`
|
|
|
126
127
|
position: absolute;
|
|
127
128
|
top: 8px;
|
|
128
129
|
right: 24px;
|
|
130
|
+
padding: 4px;
|
|
131
|
+
border-radius: 4px;
|
|
132
|
+
|
|
133
|
+
&,
|
|
134
|
+
&:hover,
|
|
135
|
+
&.Mui-disabled {
|
|
136
|
+
background: ${colors.primary.main};
|
|
137
|
+
}
|
|
129
138
|
}
|
|
130
139
|
|
|
131
140
|
&:hover {
|