fix: use custom button in dropdown

This commit is contained in:
thecodrr
2022-07-06 11:54:47 +05:00
parent c48a4a099d
commit b0cec9caef
2 changed files with 4 additions and 2 deletions

View File

@@ -1,11 +1,12 @@
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
import { useRef, useState } from "react";
import { Button, Text } from "rebass";
import { Text } from "rebass";
import { Icon } from "./icon";
import { Icons } from "../icons";
import { useIsMobile, useToolbarLocation } from "../stores/toolbar-store";
import { MenuPresenter } from "../../components/menu";
import { getToolbarElement } from "../utils/dom";
import { Button } from "../../components/button";
export function Dropdown(props) {
const { items, selectedItem, buttonRef, menuWidth } = props;
const internalRef = useRef();

View File

@@ -1,5 +1,5 @@
import { useRef, useState } from "react";
import { Button, Flex, Text } from "rebass";
import { Flex, Text } from "rebass";
import { Icon } from "./icon";
import { Icons } from "../icons";
// import { MenuPresenter, MenuPresenterProps } from "../../components/menu/menu";
@@ -7,6 +7,7 @@ import { MenuItem } from "../../components/menu/types";
import { useIsMobile, useToolbarLocation } from "../stores/toolbar-store";
import { MenuPresenter } from "../../components/menu";
import { getToolbarElement } from "../utils/dom";
import { Button } from "../../components/button";
type DropdownProps = {
selectedItem: string | JSX.Element;