venues and ui changes
This commit is contained in:
30
components/dialogs/DialogWrapper.tsx
Normal file
30
components/dialogs/DialogWrapper.tsx
Normal file
@@ -0,0 +1,30 @@
|
||||
'use client'
|
||||
import React from 'react'
|
||||
import { Dialog, DialogContent, DialogDescription, DialogHeader, DialogTitle } from '../ui/dialog'
|
||||
|
||||
export default function DialogWrapper({
|
||||
title,
|
||||
description,
|
||||
form,
|
||||
open,
|
||||
onOpenChange,
|
||||
|
||||
}: {
|
||||
title: string,
|
||||
description?: string,
|
||||
form: React.ReactNode,
|
||||
open: boolean,
|
||||
onOpenChange: (open: boolean) => void
|
||||
}) {
|
||||
return (
|
||||
<Dialog open={open} onOpenChange={onOpenChange}>
|
||||
<DialogContent onOpenAutoFocus={(e) => e.preventDefault()}>
|
||||
<DialogHeader>
|
||||
<DialogTitle>{title}</DialogTitle>
|
||||
<DialogDescription>{description}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<div className="space-y-4">{form}</div>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user