UNPKG

@explita/editor

Version:

`@explita/editor` is a versatile, modern rich-text editor built on TipTap for seamless integration into React applications. It provides extensive customization options and advanced features to cater to diverse content creation needs.

8 lines (7 loc) 983 B
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; import { keyboardShortcuts } from "../lib/constants"; import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger, } from "./ui/sheet"; import { MdKeyboardHide } from "react-icons/md"; export function KeyboardShortcut() { return (_jsxs(Sheet, { children: [_jsx(SheetTrigger, { title: "Open Keyboard Shortcuts", children: _jsx(MdKeyboardHide, { size: 16 }) }), _jsxs(SheetContent, { className: "explitaeditor:p-0", children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { className: "explitaeditor:p-3", children: "Keyboard Shortcuts" }) }), _jsx("div", { className: "editor-keyboard-shortcuts-wrapper", children: keyboardShortcuts.map((shortcut) => (_jsxs("div", { className: "content group", children: [_jsx("span", { children: shortcut.command }), _jsx("span", { children: shortcut.windows.split("+").map((key) => (_jsx("kbd", { children: key.trim() }, key))) })] }, shortcut.command))) })] })] })); }