File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ import "../styles/cm.css";
15
15
16
16
if (typeof window !== "undefined" && typeof window.navigator !== "undefined") {
17
17
require("codemirror/mode/javascript/javascript");
18
+ require("codemirror/addon/scroll/simplescrollbars");
18
19
require("../plugins/cm-reason-mode");
19
20
}
20
21
|} ;
@@ -38,6 +39,10 @@ module CM = {
38
39
readOnly: bool ,
39
40
[@bs.optional]
40
41
lineWrapping: bool ,
42
+ [@bs.optional]
43
+ fixedGutter: bool ,
44
+ [@bs.optional]
45
+ scrollbarStyle: string ,
41
46
};
42
47
};
43
48
@@ -385,9 +390,11 @@ let default = (props: Props.t): React.element => {
385
390
cmOptions-> CM . Options . lineWrapping,
386
391
false ,
387
392
),
393
+ ~fixedGutter= false ,
388
394
~readOnly=
389
395
Belt . Option . getWithDefault(cmOptions-> CM . Options . readOnly, false ),
390
396
~lineNumbers= true ,
397
+ ~scrollbarStyle= "overlay" ,
391
398
() ,
392
399
);
393
400
let cm = CM . fromTextArea(input, options);
Original file line number Diff line number Diff line change @@ -62,5 +62,6 @@ let make =
62
62
() ,
63
63
);
64
64
65
- React . createElement(dynamicComponent, props);
65
+ /* React.createElement(dynamicComponent, props);*/
66
+ CodeMirrorBase . default(props);
66
67
};
Original file line number Diff line number Diff line change 1
- export { default } from "../re_pages/Playground.bs" ;
1
+ import dynamic from "next/dynamic" ;
2
+
3
+ const Playground = dynamic ( ( ) => import ( "../re_pages/Playground.bs" ) , {
4
+ ssr : false ,
5
+ //loading: () => <div> Loading... </div>
6
+ } ) ;
7
+
8
+ export default Playground ;
You can’t perform that action at this time.
0 commit comments