@rtdui/editor
Version:
React rich text editor based on tiptap
35 lines (32 loc) • 733 B
JavaScript
'use client';
import { jsx } from 'react/jsx-runtime';
import { forwardRef } from 'react';
import clsx from 'clsx';
const defaultProps = {
sticky: true
};
const ToolbarControl = forwardRef(
(props, ref) => {
const { className, children, sticky, ...others } = {
...defaultProps,
...props
};
return /* @__PURE__ */ jsx(
"div",
{
className: clsx(
"navbar min-h-0",
"flex flex-wrap gap-2",
{ "sticky top-0 z-10": sticky },
className
),
ref,
...others,
children
}
);
}
);
ToolbarControl.displayName = "@rtdui/editor/ToolbarControl";
export { ToolbarControl };
//# sourceMappingURL=ToolbarControl.mjs.map