Skip to content

Commit 218a171

Browse files
author
Fabian
committed
Type fixes, closes #155
1 parent dee45c8 commit 218a171

File tree

2 files changed

+17
-6
lines changed

2 files changed

+17
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@editorjs/table",
33
"description": "Table for Editor.js",
4-
"version": "2.4.1",
4+
"version": "2.4.2",
55
"license": "MIT",
66
"repository": "https://github.com/editor-js/table",
77
"files": [

src/toolbox.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
import Popover from "./utils/popover";
22
import * as $ from "./utils/dom";
33
import { IconMenuSmall } from "@codexteam/icons";
4+
5+
/**
6+
* @typedef {object} PopoverItem
7+
* @property {string} label - button text
8+
* @property {string} icon - button icon
9+
* @property {boolean} confirmationRequired - if true, a confirmation state will be applied on the first click
10+
* @property {function} hideIf - if provided, item will be hid, if this method returns true
11+
* @property {function} onClick - click callback
12+
*/
13+
414
/**
515
* Toolbox is a menu for manipulation of rows/cols
616
*
@@ -14,11 +24,12 @@ export default class Toolbox {
1424
/**
1525
* Creates toolbox buttons and toolbox menus
1626
*
17-
* @param {object} api - Editor.js api
18-
* @param {PopoverItem[]} items - Editor.js api
19-
* @param {function} onOpen - callback fired when the Popover is opening
20-
* @param {function} onClose - callback fired when the Popover is closing
21-
* @param {string} [cssModifier] - the modifier for the Toolbox. Allows to add some specific styles.
27+
* @param {Object} config
28+
* @param {any} config.api - Editor.js api
29+
* @param {PopoverItem[]} config.items - Editor.js api
30+
* @param {function} config.onOpen - callback fired when the Popover is opening
31+
* @param {function} config.onClose - callback fired when the Popover is closing
32+
* @param {string} config.cssModifier - the modifier for the Toolbox. Allows to add some specific styles.
2233
*/
2334
constructor({ api, items, onOpen, onClose, cssModifier = "" }) {
2435
this.api = api;

0 commit comments

Comments
 (0)