mui-tiptap
Version:
A Material-UI (MUI) styled WYSIWYG rich text editor, using Tiptap
34 lines (33 loc) • 1.44 kB
TypeScript
import { type SxProps } from "@mui/material/styles";
import { type ComponentPropsWithoutRef } from "react";
import { type ColorSwatchButtonClasses } from "./ColorSwatchButton.classes";
export interface ColorSwatchButtonProps extends Omit<ComponentPropsWithoutRef<"button">, "color" | "className" | "classes"> {
/**
* What color is shown with this swatch. If not provided, shows a checkerboard
* pattern, typically used as "not set" or "transparent".
*/
value?: string;
/**
* An optional human-friendly name for this color, used as an aria-label for
* the button.
*/
label?: string;
/**
* Whether this swatch color is the currently active color. If true, shows an
* overlaid checkmark as a visual indicator.
*/
active?: boolean;
/** If given, sets the padding between the color and the border of the swatch. */
padding?: string | number;
/** Optional additional className to provide to the root element. */
className?: string;
/** Override or extend existing styles. */
classes?: Partial<ColorSwatchButtonClasses>;
/** Provide custom styles. */
sx?: SxProps;
}
/**
* Renders a button in the given color `value`, useful for showing and allowing
* selecting a color preset.
*/
export declare const ColorSwatchButton: import("react").ForwardRefExoticComponent<ColorSwatchButtonProps & import("react").RefAttributes<HTMLButtonElement>>;