@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
59 lines (57 loc) • 2.39 kB
JavaScript
;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// packages/editor/src/components/collab-sidebar/note-card.js
var note_card_exports = {};
__export(note_card_exports, {
NoteCard: () => NoteCard
});
module.exports = __toCommonJS(note_card_exports);
var import_components = require("@wordpress/components");
var import_ui = require("@wordpress/ui");
var import_note_byline = require("./note-byline.cjs");
var import_jsx_runtime = require("react/jsx-runtime");
function NoteCard({ note, actions, className, children, ...props }) {
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Stack, { direction: "column", gap: "sm", className, ...props, children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ui.Stack, { direction: "row", align: "center", justify: "flex-start", gap: "md", children: [
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_note_byline.NoteByline,
{
avatar: note?.author_avatar_urls?.[48],
name: note?.author_name,
date: note?.date,
userId: note?.author
}
),
actions && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
import_components.FlexItem,
{
className: "editor-collab-sidebar-panel__note-actions",
onClick: (event) => event.stopPropagation(),
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ui.Stack, { direction: "row", align: "center", children: actions })
}
)
] }),
children
] });
}
// Annotate the CommonJS export names for ESM import in node:
0 && (module.exports = {
NoteCard
});
//# sourceMappingURL=note-card.cjs.map