@wordpress/editor
Version:
Enhanced block editor for WordPress posts.
34 lines (33 loc) • 1.16 kB
JavaScript
// packages/editor/src/components/collab-sidebar/note-card.js
import { FlexItem } from "@wordpress/components";
import { Stack } from "@wordpress/ui";
import { NoteByline } from "./note-byline.mjs";
import { jsx, jsxs } from "react/jsx-runtime";
function NoteCard({ note, actions, className, children, ...props }) {
return /* @__PURE__ */ jsxs(Stack, { direction: "column", gap: "sm", className, ...props, children: [
/* @__PURE__ */ jsxs(Stack, { direction: "row", align: "center", justify: "flex-start", gap: "md", children: [
/* @__PURE__ */ jsx(
NoteByline,
{
avatar: note?.author_avatar_urls?.[48],
name: note?.author_name,
date: note?.date,
userId: note?.author
}
),
actions && /* @__PURE__ */ jsx(
FlexItem,
{
className: "editor-collab-sidebar-panel__note-actions",
onClick: (event) => event.stopPropagation(),
children: /* @__PURE__ */ jsx(Stack, { direction: "row", align: "center", children: actions })
}
)
] }),
children
] });
}
export {
NoteCard
};
//# sourceMappingURL=note-card.mjs.map