UNPKG

@wordpress/block-editor

Version:
39 lines (38 loc) 1.22 kB
// packages/block-editor/src/components/inserter/tips.js import { __ } from "@wordpress/i18n"; import { createInterpolateElement, useState } from "@wordpress/element"; import { Tip } from "@wordpress/components"; import { jsx } from "react/jsx-runtime"; var globalTips = [ createInterpolateElement( __( "While writing, you can press <kbd>/</kbd> to quickly insert new blocks." ), { kbd: /* @__PURE__ */ jsx("kbd", {}) } ), createInterpolateElement( __( "Indent a list by pressing <kbd>space</kbd> at the beginning of a line." ), { kbd: /* @__PURE__ */ jsx("kbd", {}) } ), createInterpolateElement( __( "Outdent a list by pressing <kbd>backspace</kbd> at the beginning of a line." ), { kbd: /* @__PURE__ */ jsx("kbd", {}) } ), __("Drag files into the editor to automatically insert media blocks."), __("Change a block's type by pressing the block icon on the toolbar.") ]; function Tips() { const [randomIndex] = useState( Math.floor(Math.random() * globalTips.length) ); return /* @__PURE__ */ jsx(Tip, { children: globalTips[randomIndex] }); } var tips_default = Tips; export { tips_default as default }; //# sourceMappingURL=tips.js.map