@nethru/ui 1.0.33 → 1.0.34

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/dist/Editor.js CHANGED
@@ -7,7 +7,7 @@ import { useMemo, useState } from "react";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
  export default function Editor({
10
- editable = true,
10
+ readOnly = false,
11
11
  error = false,
12
12
  helperText,
13
13
  basicSetup,
@@ -20,23 +20,23 @@ export default function Editor({
20
20
  const [focused, setFocused] = useState(false);
21
21
  const styles = useMemo(() => {
22
22
  return {
23
- borderBottom: focused ? `3px solid ${error ? '#d32f2f' : '#1976d2'}` : `${editable ? '2px' : '0px'} solid rgba(0, 0, 0, 0.42)`
23
+ borderBottom: focused ? `3px solid ${error ? '#d32f2f' : '#1976d2'}` : `${!readOnly ? '2px' : '0px'} solid rgba(0, 0, 0, 0.42)`
24
24
  };
25
- }, [editable, error, focused]);
25
+ }, [readOnly, error, focused]);
26
26
  const handleUpdate = viewUpdate => {
27
27
  setFocused(viewUpdate.view.hasFocus);
28
28
  if (onUpdate) onUpdate(viewUpdate);
29
29
  };
30
30
  return /*#__PURE__*/_jsxs(Box, {
31
31
  children: [/*#__PURE__*/_jsx(CodeMirror, {
32
- editable: editable,
32
+ editable: !readOnly,
33
33
  extensions: [jsonFormat ? json() : javascript({
34
34
  jsx: true
35
35
  }), EditorView.lineWrapping, ...extensions],
36
36
  basicSetup: {
37
37
  ...basicSetup,
38
38
  highlightActiveLineGutter: false,
39
- highlightActiveLine: editable
39
+ highlightActiveLine: !readOnly
40
40
  },
41
41
  onUpdate: handleUpdate,
42
42
  style: {
@@ -11,6 +11,9 @@ export default function PropertyTable({
11
11
  }) {
12
12
  const styles = useMemo(() => {
13
13
  const result = {
14
+ '&.MuiDataGrid-root': {
15
+ borderBottom: 'none'
16
+ },
14
17
  '.MuiDataGrid-columnHeaders': {
15
18
  backgroundColor: '#f8f9fa'
16
19
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nethru/ui",
3
- "version": "1.0.33",
3
+ "version": "1.0.34",
4
4
  "main": "dist/index.js",
5
5
  "files": [
6
6
  "/dist"