@ember-eui/core 7.0.6 → 7.0.8

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.
@@ -13,6 +13,8 @@ export interface EuiMarkdownEditorToolbarArgs {
13
13
  processingPluginList?: typeof defaultProcessingPlugins;
14
14
  replaceNode?: EuiMarkdownEditorComponent['replaceNode'];
15
15
  value: string;
16
+ //you can pass in a string or an array of strings to be added to the root element
17
+ rootClasses?: string | string[];
16
18
  }
17
19
 
18
20
  export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMarkdownEditorToolbarArgs> {
@@ -40,12 +42,20 @@ export default class EuiMarkdownEditorToolbarComponent extends Component<EuiMark
40
42
  .use(identityCompiler);
41
43
  }
42
44
 
45
+ get rootClasses(): string[] {
46
+ let baseClasses = ['euiMarkdownFormat', 'euiText', 'euiText--medium'];
47
+ if (this.args.rootClasses) {
48
+ baseClasses = baseClasses.concat(this.args.rootClasses);
49
+ }
50
+ return baseClasses;
51
+ }
52
+
43
53
  @cached
44
54
  get result() {
45
55
  try {
46
56
  const processed = this.processor.processSync(this.args.value);
47
57
  return toDOM(processed.result as RehypeNode, {
48
- rootClasses: ['euiMarkdownFormat', 'euiText', 'euiText--medium']
58
+ rootClasses: this.rootClasses
49
59
  });
50
60
  //eslint-disable-next-line
51
61
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ember-eui/core",
3
- "version": "7.0.6",
3
+ "version": "7.0.8",
4
4
  "description": "Ember Components for Elastic UI",
5
5
  "keywords": [
6
6
  "ember-addon",
@@ -186,5 +186,5 @@
186
186
  "volta": {
187
187
  "extends": "../../package.json"
188
188
  },
189
- "gitHead": "dd0f213c42296e63e079c7e13331bf1005dd3566"
189
+ "gitHead": "f6ff3ec417ddd6cdc85f937eac6aa01d90931278"
190
190
  }