showMenu refactor - context is now available inside menu

This commit is contained in:
Jan Prochazka
2020-12-03 09:33:29 +01:00
parent e4b605162e
commit 327f2140cf
11 changed files with 144 additions and 65 deletions

View File

@@ -1,10 +1,11 @@
import React from 'react';
import { FontIcon } from '../icons';
import { showMenu } from '../modals/DropDownMenu';
import { useShowMenu } from '../modals/showMenu';
import InlineButton from './InlineButton';
export default function DropDownButton({ children }) {
const buttonRef = React.useRef(null);
const showMenu = useShowMenu();
const handleShowMenu = () => {
const rect = buttonRef.current.getBoundingClientRect();