@hypericon/mico 0.3.8 → 0.3.9

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.
@@ -12,6 +12,8 @@ export declare const MarkdownEditor: m.Component<{
12
12
  highlight?: boolean;
13
13
  /** @default true */
14
14
  enableShortcuts?: boolean;
15
+ /** Function called on licking the help button. The button is hidden if the function is undefined. */
16
+ onHelp?: () => any;
15
17
  class?: string;
16
18
  style?: string;
17
19
  }, {
@@ -133,6 +133,11 @@ exports.MarkdownEditor = {
133
133
  onclick: () => this.state.applyLink(),
134
134
  }, (0, mithril_1.default)(Icon_1.Icon, { fas: "link" })),
135
135
  ]),
136
+ attrs.onHelp !== undefined ? (0, mithril_1.default)(".editor-button-group", [
137
+ (0, mithril_1.default)("button", {
138
+ onclick: () => { var _a; return (_a = attrs.onHelp) === null || _a === void 0 ? void 0 : _a.call(attrs); },
139
+ }, (0, mithril_1.default)(Icon_1.Icon, { far: "circle-question" })),
140
+ ]) : [],
136
141
  ]),
137
142
  // Editor content
138
143
  (0, mithril_1.default)("textarea.editor-textarea", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypericon/mico",
3
- "version": "0.3.8",
3
+ "version": "0.3.9",
4
4
  "description": "UI components and utilities with Mithril",
5
5
  "author": "Ed Johnson, Hypericon Ltd",
6
6
  "license": "MIT",