* initial implementation of search modal * added hit and search suggestions * added support for multiple indices * updated sample env * added close when click outside dropdown * test for mobile * added mobile design * added shortcut * dark mode fixes * added search to docs * added plugins filter * added React import * moved filters to configurations * handled error on page load * change suggestion text * removed hits limit * handle select all * open link in current tab * change highlight colors * added support for shortcuts + auto focus * change header and footer * redesigned search ui
31 lines
680 B
TypeScript
31 lines
680 B
TypeScript
"use client"
|
|
|
|
import { useModal } from "../../../providers/modal"
|
|
import { usePageLoading } from "../../../providers/page-loading"
|
|
import Button from "../../Button"
|
|
import DetailedFeedback from "../../DetailedFeedback"
|
|
|
|
const FeedbackModal = () => {
|
|
const { setModalProps } = useModal()
|
|
const { isLoading } = usePageLoading()
|
|
|
|
const openModal = () => {
|
|
if (isLoading) {
|
|
return
|
|
}
|
|
setModalProps({
|
|
title: "Send your Feedback",
|
|
children: <DetailedFeedback />,
|
|
contentClassName: "lg:!min-h-auto !p-0",
|
|
})
|
|
}
|
|
|
|
return (
|
|
<Button onClick={openModal} variant="secondary">
|
|
Feedback
|
|
</Button>
|
|
)
|
|
}
|
|
|
|
export default FeedbackModal
|