@vonaffenfels/slate-editor 1.0.55 → 1.0.56

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vonaffenfels/slate-editor",
3
- "version": "1.0.55",
3
+ "version": "1.0.56",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -71,7 +71,7 @@
71
71
  "cssnano": "^5.0.1",
72
72
  "escape-html": "^1.0.3"
73
73
  },
74
- "gitHead": "b5aaf96b81e9d38533cc632505e6c78553e55e22",
74
+ "gitHead": "46c4cdded137ff7fdd53011ee6b999972131dd9c",
75
75
  "publishConfig": {
76
76
  "access": "public"
77
77
  }
@@ -6,13 +6,14 @@
6
6
  width: 100%;
7
7
  height: 100%;
8
8
  position: absolute;
9
- z-index: 10;
9
+ z-index: 20;
10
10
  background-color: rgba(255, 255, 255, 0.7);
11
11
  color: black;
12
12
  font-size: 1em;
13
13
  align-items: center;
14
14
  justify-content: center;
15
15
  content-visibility: auto;
16
+ outline: 3px dashed #036fe3;
16
17
  }
17
18
 
18
19
  &.storybook-inline {
@@ -37,6 +37,10 @@ export const SidebarEditorField = ({
37
37
  };
38
38
 
39
39
  const renderFieldSelectOptions = field => {
40
+ if (field.options) {
41
+ field.control.options = field.options;
42
+ }
43
+
40
44
  if (field?.control?.labels) {
41
45
  field.control.options = field.control.labels;
42
46
  }
@@ -51,7 +55,7 @@ export const SidebarEditorField = ({
51
55
  ));
52
56
  } else {
53
57
  return Object.keys(field.control.options).map(key => (
54
- <option key={`select-option-${key}`} value={field.control.options[key]}>{key}</option>
58
+ <option key={`select-option-${key}`} value={field.control.options[key]}>{field.control.options[key]}</option>
55
59
  ));
56
60
  }
57
61
  };
@@ -236,9 +240,7 @@ export const SidebarEditorField = ({
236
240
 
237
241
  onChange(fieldKey, v);
238
242
  }}>
239
- {Object.keys(field.control.options).map(key => (
240
- <option key={`select-option-${key}`} value={field.control.options[key]}>{key}</option>
241
- ))}
243
+ {renderFieldSelectOptions(field)}
242
244
  </select>
243
245
  );
244
246
  case "contentful-content":