UNPKG

mui-tiptap

Version:

A Material-UI (MUI) styled WYSIWYG rich text editor, using Tiptap

43 lines (42 loc) 1.69 kB
import { type CollapseProps } from "@mui/material/Collapse"; import { type SxProps } from "@mui/material/styles"; import type { ReactNode } from "react"; import { type MenuBarClasses } from "./MenuBar.classes"; export type MenuBarProps = Omit<CollapseProps, "children" | "in" | "className" | "classes"> & { /** * Whether to hide the menu bar. When changing between false/true, uses the * collapse animation. By default false */ hide?: boolean; /** * If true, the menu bar will not "stick" above the editor content on the * page as you scroll down past where it normally sits. */ disableSticky?: boolean; /** * The menu bar's sticky `top` offset, when `disableSticky=false`. * * Useful if there's other fixed/sticky content above the editor (like an app * navigation toolbar). By default 0. */ stickyOffset?: number; /** * Whether to unmount the menu bar when it's hidden. Unlike ordinary MUI * `Collapse` behavior, this is by default true for performance reasons, to * avoid rendering the menu bar unless it's needed/shown */ unmountOnExit?: boolean; /** The set of controls (buttons, etc) to include in the menu bar. */ children?: ReactNode; /** Class applied to the outermost `root` element. */ className?: string; /** Override or extend existing styles. */ classes?: Partial<MenuBarClasses>; /** Provide custom styles. */ sx?: SxProps; }; /** * A collapsible, optionally-sticky container for showing editor controls atop * the editor content. */ export default function MenuBar(inProps: MenuBarProps): import("react/jsx-runtime").JSX.Element;