-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathsubmit-dialog.tsx
40 lines (36 loc) · 1.09 KB
/
submit-dialog.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
'use client'
import { useState } from 'react'
import { SendIcon } from 'lucide-react'
import { Button } from '@/components/ui/button'
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
DialogTrigger
} from '@/components/ui/dialog'
import { SubmitResourceForm } from '@/components/submit-resource-form'
export function SubmitDialog() {
const [open, setOpen] = useState(false)
return (
<Dialog open={open} onOpenChange={setOpen}>
<DialogTrigger asChild>
<Button variant='outline'>
<SendIcon className='size-4 mr-2' />
<span>Submit</span>
</Button>
</DialogTrigger>
<DialogContent className='sm:max-w-[425px]'>
<DialogHeader>
<DialogTitle>Submit a resource</DialogTitle>
<DialogDescription>
Help grow our collection of valuable resources for developers. Submit a website, tool,
or article that you find useful.
</DialogDescription>
</DialogHeader>
<SubmitResourceForm setOpen={setOpen} />
</DialogContent>
</Dialog>
)
}