Skip to content

Commit

Permalink
[@mantine/tiptap] Fix missing border in custom controls (#7239)
Browse files Browse the repository at this point in the history
  • Loading branch information
rtivital committed Dec 12, 2024
1 parent 07a4a90 commit e0a7204
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const RichTextEditorControl = factory<RichTextEditorControlFactory>((_pro
aria-hidden={!interactive || undefined}
ref={ref}
unstyled={ctx.unstyled}
variant={ctx.variant || 'default'}
onMouseDown={(event) => {
event.preventDefault();
onMouseDown?.(event);
Expand Down Expand Up @@ -112,7 +113,7 @@ export function createControl({
isDisabled,
}: CreateControlProps) {
const Control = forwardRef<HTMLButtonElement, RichTextEditorControlBaseProps>((props, ref) => {
const { editor, labels, variant } = useRichTextEditorContext();
const { editor, labels } = useRichTextEditorContext();
const _label = labels[label] as string;
return (
<RichTextEditorControlBase
Expand All @@ -124,7 +125,6 @@ export function createControl({
onClick={() => (editor as any)?.chain().focus()[operation.name](operation.attributes).run()}
icon={props.icon || icon}
disabled={isDisabled?.(editor) || false}
variant={variant || 'default'}
/>
);
});
Expand Down

0 comments on commit e0a7204

Please sign in to comment.