mirror of https://github.com/buster-so/buster.git
Fix table node
This commit is contained in:
parent
700e8f50a7
commit
f32a41b048
|
@ -44,7 +44,8 @@ import {
|
||||||
BucketPaint2,
|
BucketPaint2,
|
||||||
SquareLayoutGrid4,
|
SquareLayoutGrid4,
|
||||||
Trash2,
|
Trash2,
|
||||||
Xmark
|
Xmark,
|
||||||
|
SquareLayoutGrid
|
||||||
} from '@/components/ui/icons';
|
} from '@/components/ui/icons';
|
||||||
import {
|
import {
|
||||||
type TElement,
|
type TElement,
|
||||||
|
@ -183,7 +184,7 @@ function TableFloatingToolbar({ children, ...props }: React.ComponentProps<typeo
|
||||||
<DropdownMenu modal={false}>
|
<DropdownMenu modal={false}>
|
||||||
<DropdownMenuTrigger>
|
<DropdownMenuTrigger>
|
||||||
<ToolbarButton tooltip="Cell borders">
|
<ToolbarButton tooltip="Cell borders">
|
||||||
<Grid2X2 />
|
<SquareLayoutGrid />
|
||||||
</ToolbarButton>
|
</ToolbarButton>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
|
|
||||||
|
@ -264,9 +265,12 @@ function TableFloatingToolbar({ children, ...props }: React.ComponentProps<typeo
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function TableBordersDropdownMenuContent(
|
// TableBordersDropdownMenuContent is now a forwardRef functional component
|
||||||
props: React.ComponentProps<typeof DropdownMenuPrimitive.Content>
|
const TableBordersDropdownMenuContent = React.forwardRef<
|
||||||
) {
|
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
|
||||||
|
React.ComponentProps<typeof DropdownMenuPrimitive.Content>
|
||||||
|
>(function TableBordersDropdownMenuContent(props, ref) {
|
||||||
|
// Get the current editor instance
|
||||||
const editor = useEditorRef();
|
const editor = useEditorRef();
|
||||||
const {
|
const {
|
||||||
getOnSelectTableBorder,
|
getOnSelectTableBorder,
|
||||||
|
@ -333,7 +337,7 @@ function TableBordersDropdownMenuContent(
|
||||||
</DropdownMenuGroup>
|
</DropdownMenuGroup>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
|
|
||||||
function ColorDropdownMenu({ children, tooltip }: { children: React.ReactNode; tooltip: string }) {
|
function ColorDropdownMenu({ children, tooltip }: { children: React.ReactNode; tooltip: string }) {
|
||||||
const [open, setOpen] = React.useState(false);
|
const [open, setOpen] = React.useState(false);
|
||||||
|
|
Loading…
Reference in New Issue