Skip to content

Commit 071603b

Browse files
committed
update headlessui deprecated components and opacity
1 parent 74ac1c1 commit 071603b

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

components/Card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const Card = ({ title, description, imgSrc, href }) => (
66
<div
77
className={`${
88
imgSrc && 'h-full'
9-
} border-opacity-60 overflow-hidden rounded-md border-2 border-gray-200 dark:border-gray-700`}
9+
} overflow-hidden rounded-md border-2 border-gray-200/60 dark:border-gray-700/60`}
1010
>
1111
{imgSrc &&
1212
(href ? (

components/MobileNav.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
'use client'
22

3-
import { Dialog, Transition } from '@headlessui/react'
3+
import { Dialog, DialogPanel, Transition, TransitionChild } from '@headlessui/react'
44
import { disableBodyScroll, enableBodyScroll, clearAllBodyScrollLocks } from 'body-scroll-lock'
55
import { Fragment, useState, useEffect, useRef } from 'react'
66
import Link from './Link'
@@ -44,7 +44,7 @@ const MobileNav = () => {
4444
</button>
4545
<Transition appear show={navShow} as={Fragment} unmount={false}>
4646
<Dialog as="div" onClose={onToggleNav} unmount={false}>
47-
<Transition.Child
47+
<TransitionChild
4848
as={Fragment}
4949
enter="ease-out duration-300"
5050
enterFrom="opacity-0"
@@ -55,9 +55,9 @@ const MobileNav = () => {
5555
unmount={false}
5656
>
5757
<div className="fixed inset-0 z-60 bg-black/25" />
58-
</Transition.Child>
58+
</TransitionChild>
5959

60-
<Transition.Child
60+
<TransitionChild
6161
as={Fragment}
6262
enter="transition ease-in-out duration-300 transform"
6363
enterFrom="translate-x-full opacity-0"
@@ -67,7 +67,7 @@ const MobileNav = () => {
6767
leaveTo="translate-x-full opacity-0"
6868
unmount={false}
6969
>
70-
<Dialog.Panel className="fixed top-0 left-0 z-70 h-full w-full bg-white opacity-95 duration-300 dark:bg-gray-950 dark:opacity-[0.98]">
70+
<DialogPanel className="fixed top-0 left-0 z-70 h-full w-full bg-white/95 duration-300 dark:bg-gray-950/98">
7171
<nav
7272
ref={navRef}
7373
className="mt-8 flex h-full basis-0 flex-col items-start overflow-y-auto pt-2 pl-12 text-left"
@@ -97,8 +97,8 @@ const MobileNav = () => {
9797
/>
9898
</svg>
9999
</button>
100-
</Dialog.Panel>
101-
</Transition.Child>
100+
</DialogPanel>
101+
</TransitionChild>
102102
</Dialog>
103103
</Transition>
104104
</>

0 commit comments

Comments
 (0)