UNPKG

mui-tiptap

Version:

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

29 lines (28 loc) 1.24 kB
import { type BoxProps } from "@mui/material/Box"; import { type SxProps } from "@mui/material/styles"; import type { ReactNode } from "react"; import { type FieldContainerClasses } from "./FieldContainer.classes"; export type FieldContainerProps = Omit<BoxProps, "children" | "className" | "classes"> & { /** * Which style to use for the field. "outlined" shows a border around the children, * which updates its appearance depending on hover/focus states, like MUI's * OutlinedInput. "standard" does not include any outer border. */ variant?: "outlined" | "standard"; /** The content to render inside the container. */ children: ReactNode; /** Class applied to the `root` element. */ className?: string; /** Override or extend existing styles. */ classes?: Partial<FieldContainerClasses>; focused?: boolean; disabled?: boolean; /** Provide custom styles. */ sx?: SxProps; }; /** * Renders an element with classes and styles that correspond to the state and * style-variant of a user-input field, the content of which should be passed in as * `children`. */ export default function FieldContainer(inProps: FieldContainerProps): import("react/jsx-runtime").JSX.Element;