Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcuts #1230

Merged
merged 2 commits into from
Oct 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 11 additions & 17 deletions web/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ const Search: React.FunctionComponent<SearchProps> = (props) => {
if (value.item.kind === 'lua') {
router.push(`/lua#${value.item.name}`, undefined, { scroll: false })
}
setIsOpen(false)
}
setIsOpen(false)
}

const closeModal = () => {
Expand All @@ -139,24 +139,18 @@ const Search: React.FunctionComponent<SearchProps> = (props) => {
enter="ease-out duration-300"
enterFrom="opacity-0"
enterTo="opacity-100"
leave="ease-in duration-200"
leaveFrom="opacity-100"
leaveTo="opacity-0"
>
<div className="fixed inset-0 bg-black bg-opacity-25 backdrop-blur-sm" />
</Transition.Child>

<div className="fixed inset-0">
<div className="flex h-screen w-screen items-center justify-center p-16 text-center">
<Transition.Child
as={Fragment}
enter="ease-out duration-300"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
leave="ease-in duration-200"
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
<Transition.Child
as={Fragment}
enter="ease-out duration-300"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
>
<div className="fixed inset-0">
<div className="flex h-screen w-screen items-start justify-center p-16 text-center">
<Dialog.Panel className="flex flex-col max-h-full w-full max-w-2xl p-1 bg-gray-200 dark:bg-gray-800 transform rounded-xl text-left align-middle shadow transition-all border border-gray-800 dark:border-white border-opacity-10 dark:border-opacity-10">
<Combobox value={selected} nullable onChange={onChange}>
<div className="flex">
Expand Down Expand Up @@ -190,9 +184,9 @@ const Search: React.FunctionComponent<SearchProps> = (props) => {
</Combobox.Options>
</Combobox>
</Dialog.Panel>
</Transition.Child>
</div>
</div>
</div>
</Transition.Child>
</Dialog>
</Transition>
</>
Expand Down
2 changes: 1 addition & 1 deletion web/pages/_document.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Document, { Html, Head, Main, NextScript } from 'next/document'
class MyDocument extends Document {
render() {
return (
<Html lang="en" className="theme-compiled">
<Html lang="en" className="theme-compiled scroll-smooth">
<Head />
<body
className={`antialiased text-lg bg-white dark:bg-gray-900 dark:text-white leading-base`}
Expand Down