fix(web): floating "Import filter" dropdown button (#1102)

fix: incorrect z-height on "Import filter" dropdown button
This commit is contained in:
stacksmash76 2023-09-10 18:38:42 +02:00 committed by GitHub
parent 1215036d89
commit 528405d1cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -141,8 +141,7 @@ export function Filters() {
<FilterAddForm isOpen={createFilterIsOpen} toggle={toggleCreateFilter} />
<div className="my-6 max-w-screen-xl mx-auto px-4 sm:px-6 lg:px-8 flex justify-between">
<h1 className="text-3xl font-bold text-black dark:text-white">Filters</h1>
<div className="relative">
<Menu>
<Menu as="div" className="relative">
{({ open }) => (
<>
<button
@ -162,6 +161,7 @@ export function Filters() {
</Menu.Button>
<Transition
show={open}
as={Fragment}
enter="transition ease-out duration-100 transform"
enterFrom="opacity-0 scale-95"
enterTo="opacity-100 scale-100"
@ -169,15 +169,14 @@ export function Filters() {
leaveFrom="opacity-100 scale-100"
leaveTo="opacity-0 scale-95"
>
<Menu.Items className="absolute right-0 mt-0.5 w-46 bg-white dark:bg-gray-700 rounded-md shadow-lg">
<Menu.Items className="absolute z-10 right-0 mt-0.5 w-46 bg-white dark:bg-gray-700 rounded-md shadow-lg">
<Menu.Item>
{({ active }) => (
<button
type="button"
className={`${active
? "bg-gray-50 dark:bg-gray-600"
: ""
} w-full text-left py-2 px-4 text-sm font-medium text-gray-700 dark:text-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 dark:focus:ring-blue-500`}
className={classNames(
active ? "bg-gray-50 dark:bg-gray-600" : "",
"w-full text-left py-2 px-4 text-sm font-medium text-gray-700 dark:text-gray-200 rounded-md focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 dark:focus:ring-blue-500")}
onClick={() => setShowImportModal(true)}
>
Import Filter
@ -190,7 +189,6 @@ export function Filters() {
)}
</Menu>
</div>
</div>
{showImportModal && (
<div className="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50">