mirror of
https://github.com/ritz078/transform.git
synced 2026-11-22 09:01:31 +03:00
possible implementation for scroll fix
This commit is contained in:
1 parent
7564ac7d3c
commit
022997b9b5
4 files changed
+16
-9
No files matched your search
@@ -97,9 +97,16 @@ export default class ConversionPanel extends PureComponent {
|
||||
fetchJSON = async () => {
|
||||
const url = window.prompt('Enter URL to fetch JSON from a remote server.')
|
||||
if (!url) return
|
||||
const res = await unfetch(url)
|
||||
const json = await res.json()
|
||||
this.onChange(JSON.stringify(json, null, 2))
|
||||
try {
|
||||
const res = await unfetch(url)
|
||||
const json = await res.json()
|
||||
this.onChange(JSON.stringify(json, null, 2))
|
||||
} catch (e) {
|
||||
this.setState({
|
||||
info: e.message,
|
||||
infoType: "error"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onChange = async (newValue, leftSplitValue) => {
|
||||
@@ -190,8 +197,7 @@ export default class ConversionPanel extends PureComponent {
|
||||
const codeMirrorOptions = {
|
||||
lineNumbers: true,
|
||||
theme: "chrome-devtools",
|
||||
lineWrapping: true,
|
||||
scrollbarStyle: null
|
||||
lineWrapping: true
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
+1
-1
@@ -53,8 +53,8 @@
|
||||
"stringify-object": "^3.2.0",
|
||||
"transform-css-to-js": "^0.1.1",
|
||||
"transform-graphql-type-annotations": "^0.1.1",
|
||||
"transform-json-types": "^0.2.3",
|
||||
"transform-svg-to-native": "^0.1.1",
|
||||
"transform-json-types": "^0.2.2",
|
||||
"unfetch": "^3.0.0",
|
||||
"xml-js": "^1.4.1"
|
||||
},
|
||||
|
||||
@@ -207,6 +207,7 @@
|
||||
height: 300px;
|
||||
color: black;
|
||||
direction: ltr;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* PADDING */
|
||||
|
||||
@@ -5414,9 +5414,9 @@ transform-graphql-type-annotations@^0.1.1:
|
||||
apollo-codegen "0.17.0-alpha.1"
|
||||
graphql "^0.10.5"
|
||||
|
||||
transform-json-types@^0.2.2:
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/transform-json-types/-/transform-json-types-0.2.2.tgz#c1f9e2fc827522edbaa6f2b92f689c91b3a35ad7"
|
||||
transform-json-types@^0.2.3:
|
||||
version "0.2.3"
|
||||
resolved "https://registry.yarnpkg.com/transform-json-types/-/transform-json-types-0.2.3.tgz#04b68084033cd5511c06007cf4c66019868d1321"
|
||||
dependencies:
|
||||
lodash "^4.17.4"
|
||||
sha1 "^1.1.1"
|
||||
|
||||
Reference in new issue
Block a user