'use client'; import { AlignInfoFillIcon as IconInfoCustomFill } from '@/components/misc/alignui-icons'; import * as React from 'react'; import * as LabelPrimitives from '@radix-ui/react-label'; import { Upload } from 'lucide-react'; import * as Badge from '@/components/ui/badge'; import * as Button from '@/components/ui/button'; import * as Checkbox from '@/components/ui/checkbox'; import * as Input from '@/components/ui/input'; import * as Label from '@/components/ui/label'; import * as Modal from '@/components/ui/modal'; import * as Tag from '@/components/ui/tag'; import * as Tooltip from '@/components/ui/tooltip'; export default function WorkUploadModal() { const [open, setOpen] = React.useState(true); const [tags, setTags] = React.useState([ 'Digital Painting', 'Retrowave', 'NFT', ]); const [inputValue, setInputValue] = React.useState(''); const addTag = (e: React.KeyboardEvent) => { if (e.key === 'Enter' && inputValue.trim()) { const newTag = inputValue.trim(); if (!tags.some((tag) => tag.toLowerCase() === newTag.toLowerCase())) { setTags([...tags, newTag]); setInputValue(''); } } }; const removeTag = (tag: string) => { setTags(tags.filter((t) => t !== tag)); }; return ( Open Modal
Add Tags (max. 8) Use relevant keywords, separated by commas. Tags should be concise and descriptive. setInputValue(e.target.value)} onKeyDown={addTag} />
{tags.map((tag) => ( {tag} removeTag(tag)} /> ))}
Display Preferences
Display on profile NEW
Disable commenting
Add to portfolio
Choose a portfolio to add your work.
Choose
Add Download File
Share your file and allow downloads.
Add
Cancel Upload
); }