Skip to content

Commit

Permalink
fix: menu bg colors (#433)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nirajn2311 authored Feb 9, 2024
1 parent 25f71f6 commit 7e5b9db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions apps/frontend/src/components/tiptap.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
MenuList,
Text,
useColorMode,
useColorModeValue,
} from "@chakra-ui/react";
import {
autoUpdate,
Expand Down Expand Up @@ -273,6 +274,7 @@ function ToolBar({ editor, user }) {
}

function BubbleMenuBar({ editor, isLinkHover }) {
const menuBgColor = useColorModeValue("white", "gray.700");
const addLink = () => {
const url = window.prompt("URL");

Expand All @@ -292,7 +294,7 @@ function BubbleMenuBar({ editor, isLinkHover }) {
borderRadius="lg"
overflowX="auto"
id="bubble-menu"
background="white"
background={menuBgColor}
>
<Button
variant="ghost"
Expand Down Expand Up @@ -337,14 +339,16 @@ function HoverMenuBar({
linkEl,
setLinkEl,
}) {
const menuBgColor = useColorModeValue("white", "gray.700");

return (
<Box
p="0.2rem"
border="1px solid silver"
borderRadius="lg"
overflowX="auto"
id="bubble-menu"
background="white"
background={menuBgColor}
width="fit-content"
visibility={
floatingMiddleware.hide?.referenceHidden ? "hidden" : "visible"
Expand Down

0 comments on commit 7e5b9db

Please sign in to comment.