Skip to content

Commit 69e3fa5

Browse files
authored
fix: better expose setting a draghandlemenu's items #1525 (#1526)
1 parent c36bb52 commit 69e3fa5

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

packages/react/src/components/SideMenu/DefaultButtons/DragHandleButton.tsx

+7-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,12 @@ export const DragHandleButton = <
1818
I extends InlineContentSchema = DefaultInlineContentSchema,
1919
S extends StyleSchema = DefaultStyleSchema
2020
>(
21-
props: Omit<SideMenuProps<BSchema, I, S>, "addBlock">
21+
props: Omit<SideMenuProps<BSchema, I, S>, "addBlock"> & {
22+
/**
23+
* The menu items to render.
24+
*/
25+
children?: React.ReactNode;
26+
}
2227
) => {
2328
const Components = useComponentsContext()!;
2429
const dict = useDictionary();
@@ -45,7 +50,7 @@ export const DragHandleButton = <
4550
icon={<MdDragIndicator size={24} data-test="dragHandle" />}
4651
/>
4752
</Components.Generic.Menu.Trigger>
48-
<Component block={props.block} />
53+
<Component block={props.block}>{props.children}</Component>
4954
</Components.Generic.Menu.Root>
5055
);
5156
};

0 commit comments

Comments
 (0)