UNPKG

@gechiui/block-editor

Version:
33 lines (29 loc) 787 B
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@gechiui/element"; /** * GeChiUI dependencies */ import { Fill, ToolbarButton } from '@gechiui/components'; import { displayShortcut } from '@gechiui/keycodes'; export function RichTextToolbarButton(_ref) { let { name, shortcutType, shortcutCharacter, ...props } = _ref; let shortcut; let fillName = 'RichText.ToolbarControls'; if (name) { fillName += `.${name}`; } if (shortcutType && shortcutCharacter) { shortcut = displayShortcut[shortcutType](shortcutCharacter); } return createElement(Fill, { name: fillName }, createElement(ToolbarButton, _extends({}, props, { shortcut: shortcut }))); } //# sourceMappingURL=toolbar-button.js.map