mirror of
https://github.com/pheralb/svgl.git
synced 2024-11-13 08:46:56 +08:00
42 lines
996 B
JavaScript
42 lines
996 B
JavaScript
import React from "react";
|
|
import {
|
|
Modal,
|
|
ModalOverlay,
|
|
ModalContent,
|
|
ModalHeader,
|
|
ModalFooter,
|
|
ModalBody,
|
|
ModalCloseButton,
|
|
useDisclosure,
|
|
IconButton,
|
|
Button,
|
|
useColorModeValue,
|
|
} from "@chakra-ui/react";
|
|
import Search from "components/search";
|
|
import { IoSearchOutline } from "react-icons/io5";
|
|
import Item from "components/sidebar/item";
|
|
|
|
const ModalSearch = (props) => {
|
|
const { isOpen, onOpen, onClose } = useDisclosure();
|
|
const bg = useColorModeValue("light.100", "dark.800");
|
|
return (
|
|
<>
|
|
<Item icon={IoSearchOutline} onClick={onOpen}>
|
|
Search
|
|
</Item>
|
|
<Modal isOpen={isOpen} onClose={onClose} motionPreset="slideInBottom">
|
|
<ModalOverlay />
|
|
<ModalContent bg={bg}>
|
|
<ModalHeader fontWeight="light">Search</ModalHeader>
|
|
<ModalCloseButton />
|
|
<ModalBody pb="5">
|
|
<Search />
|
|
</ModalBody>
|
|
</ModalContent>
|
|
</Modal>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default ModalSearch;
|