mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
feat(mobile): mobile toc menu (#9582)
Close [BS-1787](https://linear.app/affine-design/issue/BS-1787/toc-移动端适配)
This commit is contained in:
@@ -11,6 +11,7 @@ import type { ReactNode } from 'react';
|
||||
export interface MenuProps {
|
||||
children: ReactNode;
|
||||
items: ReactNode;
|
||||
title?: string;
|
||||
portalOptions?: Omit<DropdownMenuPortalProps, 'children'>;
|
||||
rootOptions?: Omit<DropdownMenuProps, 'children'>;
|
||||
contentOptions?: Omit<DropdownMenuContentProps, 'children'>;
|
||||
|
||||
@@ -20,6 +20,7 @@ import { MobileMenuSubRaw } from './sub';
|
||||
export const MobileMenu = ({
|
||||
children,
|
||||
items,
|
||||
title,
|
||||
contentOptions: {
|
||||
className,
|
||||
onPointerDownOutside,
|
||||
@@ -108,7 +109,7 @@ export const MobileMenu = ({
|
||||
*/
|
||||
if (pSetOpen) {
|
||||
return (
|
||||
<MobileMenuSubRaw items={items} subOptions={rootOptions}>
|
||||
<MobileMenuSubRaw title={title} items={items} subOptions={rootOptions}>
|
||||
{children}
|
||||
</MobileMenuSubRaw>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user