Skip to content

Commit

Permalink
chore(website): migrate deprecated Transition.Child to TransitionChild
Browse files Browse the repository at this point in the history
  • Loading branch information
corneliusroemer committed Jul 9, 2024
1 parent 6858b96 commit 1ca6c5a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions website/src/components/SearchPage/DisplaySearchDocs.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Dialog, Transition, DialogPanel, DialogTitle } from '@headlessui/react';
import { Dialog, Transition, TransitionChild, DialogPanel, DialogTitle } from '@headlessui/react';
import React, { Fragment } from 'react';

import X from '~icons/material-symbols/close';
Expand All @@ -17,7 +17,7 @@ const DisplaySearchDocs: React.FC = () => {
</button>
<Transition appear show={isOpen} as={Fragment}>
<Dialog as='div' className='relative z-10' onClose={closeDialog}>
<Transition.Child
<TransitionChild
as={Fragment}
enter='ease-out duration-300'
enterFrom='opacity-0'
Expand All @@ -27,11 +27,11 @@ const DisplaySearchDocs: React.FC = () => {
leaveTo='opacity-0'
>
<div className='fixed inset-0 bg-black bg-opacity-25' />
</Transition.Child>
</TransitionChild>

<div className='fixed inset-0 overflow-y-auto'>
<div className='flex min-h-full items-center justify-center p-4 text-center'>
<Transition.Child
<TransitionChild
as={Fragment}
enter='ease-out duration-300'
enterFrom='opacity-0 scale-95'
Expand Down Expand Up @@ -131,7 +131,7 @@ const DisplaySearchDocs: React.FC = () => {
</p>
</div>
</DialogPanel>
</Transition.Child>
</TransitionChild>
</div>
</div>
</Dialog>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Dialog, Transition, DialogPanel, DialogTitle } from '@headlessui/react';
import { Dialog, Transition, TransitionChild, DialogPanel, DialogTitle } from '@headlessui/react';
import React, { Fragment } from 'react';

import { type ReferenceAccession } from '../../types/referencesGenomes';
Expand Down Expand Up @@ -36,7 +36,7 @@ const ReferenceSequenceLinkButton: React.FC<Props> = ({ reference }) => {
</button>
<Transition appear show={isOpen} as={Fragment}>
<Dialog as='div' className='relative z-10' onClose={closeDialog}>
<Transition.Child
<TransitionChild
as={Fragment}
enter='ease-out duration-300'
enterFrom='opacity-0'
Expand All @@ -46,11 +46,11 @@ const ReferenceSequenceLinkButton: React.FC<Props> = ({ reference }) => {
leaveTo='opacity-0'
>
<div className='fixed inset-0 bg-black bg-opacity-25' />
</Transition.Child>
</TransitionChild>

<div className='fixed inset-0 overflow-y-auto'>
<div className='flex min-h-full items-center justify-center p-4 text-center'>
<Transition.Child
<TransitionChild
as={Fragment}
enter='ease-out duration-300'
enterFrom='opacity-0 scale-95'
Expand Down Expand Up @@ -96,7 +96,7 @@ const ReferenceSequenceLinkButton: React.FC<Props> = ({ reference }) => {
)}
</div>
</DialogPanel>
</Transition.Child>
</TransitionChild>
</div>
</div>
</Dialog>
Expand Down

0 comments on commit 1ca6c5a

Please sign in to comment.