11import { createMemo , For , Show } from "solid-js" ;
2- import Drawer from "corvu/drawer " ;
2+ import { Dialog } from "@kobalte/core/dialog " ;
33import {
44 getNotifications ,
55 markAllAsRead ,
@@ -25,15 +25,16 @@ export default function NotificationDrawer(props: NotificationDrawerProps) {
2525 }
2626
2727 return (
28- < Drawer open = { props . open } onOpenChange = { ( open ) => ! open && props . onClose ( ) } side = "right" >
29- < Drawer . Portal >
30- < Drawer . Overlay class = "fixed inset-0 bg-black/50 z-[70]" />
31- < Drawer . Content class = "fixed top-0 right-0 h-full w-80 sm:w-96 bg-base-100 shadow-xl z-[71] flex flex-col" >
28+ < Dialog open = { props . open } onOpenChange = { ( open ) => ! open && props . onClose ( ) } modal >
29+ < Dialog . Portal >
30+ < Dialog . Overlay class = "drawer-overlay fixed inset-0 bg-black/50 z-[70]" data-testid = "notification-overlay" />
31+ < Dialog . Content class = "drawer-content fixed top-0 right-0 h-full w-80 sm:w-96 bg-base-100 shadow-xl z-[71] flex flex-col" >
32+ < Dialog . Description class = "sr-only" > Recent system notifications and errors</ Dialog . Description >
3233 { /* Header */ }
3334 < div class = "flex items-center gap-2 px-4 py-3 border-b border-base-300 shrink-0" >
34- < Drawer . Label class = "text-lg font-semibold text-base-content flex-1" >
35+ < Dialog . Title class = "text-lg font-semibold text-base-content flex-1" >
3536 Notifications
36- </ Drawer . Label >
37+ </ Dialog . Title >
3738 < button
3839 type = "button"
3940 onClick = { markAllAsRead }
@@ -48,7 +49,7 @@ export default function NotificationDrawer(props: NotificationDrawerProps) {
4849 >
4950 Dismiss all
5051 </ button >
51- < Drawer . Close
52+ < Dialog . CloseButton
5253 class = "btn btn-ghost btn-sm btn-circle ml-1"
5354 aria-label = "Close notifications"
5455 >
@@ -59,7 +60,7 @@ export default function NotificationDrawer(props: NotificationDrawerProps) {
5960 clip-rule = "evenodd"
6061 />
6162 </ svg >
62- </ Drawer . Close >
63+ </ Dialog . CloseButton >
6364 </ div >
6465
6566 { /* Notification list */ }
@@ -129,8 +130,8 @@ export default function NotificationDrawer(props: NotificationDrawerProps) {
129130 </ ul >
130131 </ Show >
131132 </ div >
132- </ Drawer . Content >
133- </ Drawer . Portal >
134- </ Drawer >
133+ </ Dialog . Content >
134+ </ Dialog . Portal >
135+ </ Dialog >
135136 ) ;
136137}
0 commit comments