format
This commit is contained in:
parent
0da4bf3b60
commit
c47ee2cd5e
1 changed files with 35 additions and 35 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
import { Transition } from "@headlessui/react";
|
import { Transition } from "@headlessui/react";
|
||||||
import {
|
import {
|
||||||
Bars3CenterLeftIcon,
|
Bars3CenterLeftIcon,
|
||||||
ChatBubbleBottomCenterTextIcon,
|
ChatBubbleBottomCenterTextIcon,
|
||||||
} from "@heroicons/react/24/outline";
|
} from "@heroicons/react/24/outline";
|
||||||
import { nodeColors } from "../../../utils";
|
import { nodeColors } from "../../../utils";
|
||||||
import { PopUpContext } from "../../../contexts/popUpContext";
|
import { PopUpContext } from "../../../contexts/popUpContext";
|
||||||
|
|
@ -9,37 +9,37 @@ import { useContext } from "react";
|
||||||
import ChatModal from "../../../modals/chatModal";
|
import ChatModal from "../../../modals/chatModal";
|
||||||
|
|
||||||
export default function ChatTrigger({ open, setOpen }) {
|
export default function ChatTrigger({ open, setOpen }) {
|
||||||
const { openPopUp } = useContext(PopUpContext);
|
const { openPopUp } = useContext(PopUpContext);
|
||||||
return (
|
return (
|
||||||
<Transition
|
<Transition
|
||||||
show={!open}
|
show={!open}
|
||||||
appear={true}
|
appear={true}
|
||||||
enter="transition ease-out duration-300"
|
enter="transition ease-out duration-300"
|
||||||
enterFrom="translate-y-96"
|
enterFrom="translate-y-96"
|
||||||
enterTo="translate-y-0"
|
enterTo="translate-y-0"
|
||||||
leave="transition ease-in duration-300"
|
leave="transition ease-in duration-300"
|
||||||
leaveFrom="translate-y-0"
|
leaveFrom="translate-y-0"
|
||||||
leaveTo="translate-y-96"
|
leaveTo="translate-y-96"
|
||||||
>
|
>
|
||||||
<div className="absolute bottom-4 right-3">
|
<div className="absolute bottom-4 right-3">
|
||||||
<div
|
<div
|
||||||
style={{ backgroundColor: nodeColors["chat"] }}
|
style={{ backgroundColor: nodeColors["chat"] }}
|
||||||
className="border flex justify-center align-center py-1 px-3 w-12 h-12 rounded-full dark:bg-gray-800 dark:border-gray-600 dark:text-white"
|
className="border flex justify-center align-center py-1 px-3 w-12 h-12 rounded-full dark:bg-gray-800 dark:border-gray-600 dark:text-white"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setOpen(true);
|
setOpen(true);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="flex gap-3 items-center">
|
<div className="flex gap-3 items-center">
|
||||||
<ChatBubbleBottomCenterTextIcon
|
<ChatBubbleBottomCenterTextIcon
|
||||||
className="h-6 w-6 mt-1"
|
className="h-6 w-6 mt-1"
|
||||||
style={{ color: "white" }}
|
style={{ color: "white" }}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue