ish-ui 1.1.2 → 1.1.3

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.
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import React from 'react';
2
2
  import 'ace-builds/webpack-resolver';
3
3
  import 'ace-builds/src-noconflict/mode-html';
4
4
  import 'ace-builds/src-noconflict/mode-textile';
@@ -7,9 +7,10 @@ import 'ace-builds/src-noconflict/ext-language_tools';
7
7
  import 'ace-builds/src-noconflict/snippets/html';
8
8
  import 'ace-builds/src-noconflict/snippets/textile';
9
9
  interface Props {
10
- value?: string;
11
- mode?: string;
12
- onChange?: (html: any) => void;
10
+ value: string;
11
+ mode: string;
12
+ onChange: (html: any) => void;
13
+ height: string;
13
14
  }
14
- declare const _default: FunctionComponent<Props>;
15
- export default _default;
15
+ declare function HtmlEditor(props: Props): React.JSX.Element;
16
+ export default HtmlEditor;
@@ -7,12 +7,12 @@ import 'ace-builds/src-noconflict/theme-tomorrow';
7
7
  import 'ace-builds/src-noconflict/ext-language_tools';
8
8
  import 'ace-builds/src-noconflict/snippets/html';
9
9
  import 'ace-builds/src-noconflict/snippets/textile';
10
- const HtmlEditor = props => {
11
- const { value, onChange, mode = 'html' } = props;
12
- return (React.createElement(AceEditor, { mode: mode, theme: "tomorrow", fontSize: 14, height: "200px", showGutter: false, width: "100%", wrapEnabled: true, highlightActiveLine: true, enableLiveAutocompletion: mode === 'html', enableBasicAutocompletion: mode === 'html', setOptions: {
10
+ function HtmlEditor(props) {
11
+ const { value, onChange, mode = 'html', height } = props;
12
+ return (React.createElement(AceEditor, { mode: mode, theme: "tomorrow", fontSize: 14, height: height, showGutter: false, width: "100%", wrapEnabled: true, highlightActiveLine: true, enableLiveAutocompletion: mode === 'html', enableBasicAutocompletion: mode === 'html', setOptions: {
13
13
  enableSnippets: true,
14
14
  showLineNumbers: true,
15
15
  tabSize: 2,
16
16
  }, editorProps: { $blockScrolling: Infinity }, defaultValue: value, onChange: onChange }));
17
- };
17
+ }
18
18
  export default HtmlEditor;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ish-ui",
3
3
  "sideEffects": false,
4
- "version": "1.1.2",
4
+ "version": "1.1.3",
5
5
  "description": "UI elements for onCourse and other ish apps",
6
6
  "main": "main.ts",
7
7
  "devDependencies": {