fix: Add access to document TOC on mobile (#2279)
* Add TOC button for mobile * Undo NewDocumentMenu changes * Place the toc button in the correct position. * Pass menu props to menuitem * Update app/menus/TableOfContentsMenu.js Co-authored-by: Tom Moor <tom.moor@gmail.com> * Update app/menus/TableOfContentsMenu.js Co-authored-by: Tom Moor <tom.moor@gmail.com> * Use the existing prop type * Write menu inside actions prop * Prevent blank webpage behaviour for toc * Use href instead of level to determine target * Update app/scenes/Document/components/Header.js Co-authored-by: Tom Moor <tom.moor@gmail.com> * Add heading to menu items * Use existing Heading component Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -15,6 +15,7 @@ type Props = {|
|
||||
target?: "_blank",
|
||||
as?: string | React.ComponentType<*>,
|
||||
hide?: () => void,
|
||||
level?: number,
|
||||
|};
|
||||
|
||||
const MenuItem = ({
|
||||
@@ -86,6 +87,7 @@ const Spacer = styled.svg`
|
||||
export const MenuAnchor = styled.a`
|
||||
display: flex;
|
||||
margin: 0;
|
||||
margin-left: ${(props) => props.level * 10}px;
|
||||
border: 0;
|
||||
padding: 12px;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user