-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
87 additions
and
66 deletions.
There are no files selected for viewing
119 changes: 87 additions & 32 deletions
119
mango-frontend/src/components/Create Issue/CreateIssue.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,122 @@ | ||
|
||
import { Button } from "@/components/ui/button" | ||
import * as React from "react"; | ||
import { Button } from "@/components/ui/button"; | ||
import { | ||
Dialog, | ||
DialogContent, | ||
DialogHeader, | ||
DialogTitle, | ||
DialogFooter, | ||
DialogClose | ||
} from "@/components/ui/dialog" | ||
import { Input } from "@/components/ui/input" | ||
import { Textarea } from "@/components/ui/textarea" | ||
DialogClose, | ||
} from "@/components/ui/dialog"; | ||
import { Input } from "@/components/ui/input"; | ||
import { Textarea } from "@/components/ui/textarea"; | ||
import { | ||
DropdownMenu, | ||
DropdownMenuContent, | ||
DropdownMenuLabel, | ||
DropdownMenuRadioGroup, | ||
DropdownMenuRadioItem, | ||
DropdownMenuSeparator, | ||
DropdownMenuTrigger, | ||
} from "@/components/ui/dropdown-menu"; | ||
|
||
interface CreateIssueProps { | ||
isOpen: boolean; | ||
onClose: () => void; | ||
} | ||
|
||
export function CreateIssue({ isOpen, onClose }: CreateIssueProps) { | ||
const StateDropdown: React.FC = () => { | ||
const [position, setPosition] = React.useState("bottom"); | ||
|
||
return ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger asChild> | ||
<Button className="border-2">Backlog</Button> | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent className="w-56"> | ||
<DropdownMenuLabel>Panel Position</DropdownMenuLabel> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuRadioGroup value={position} onValueChange={setPosition}> | ||
<DropdownMenuRadioItem value="top">Top</DropdownMenuRadioItem> | ||
<DropdownMenuRadioItem value="bottom">Bottom</DropdownMenuRadioItem> | ||
<DropdownMenuRadioItem value="right">Right</DropdownMenuRadioItem> | ||
</DropdownMenuRadioGroup> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
); | ||
}; | ||
const PriorityDropdown: React.FC = () => { | ||
const [position, setPosition] = React.useState("bottom"); | ||
|
||
return ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger asChild> | ||
<Button className="border-2">Low</Button> | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent className="w-56"> | ||
<DropdownMenuLabel>Panel Position</DropdownMenuLabel> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuRadioGroup value={position} onValueChange={setPosition}> | ||
<DropdownMenuRadioItem value="top">Top</DropdownMenuRadioItem> | ||
<DropdownMenuRadioItem value="bottom">Bottom</DropdownMenuRadioItem> | ||
<DropdownMenuRadioItem value="right">Right</DropdownMenuRadioItem> | ||
</DropdownMenuRadioGroup> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
); | ||
}; | ||
|
||
const AssigneesDropdown: React.FC = () => { | ||
const [position, setPosition] = React.useState("bottom"); | ||
|
||
return ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger asChild> | ||
<Button className="border-2">Low</Button> | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent className="w-56"> | ||
<DropdownMenuLabel>Panel Position</DropdownMenuLabel> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuRadioGroup value={position} onValueChange={setPosition}> | ||
<DropdownMenuRadioItem value="top">Top</DropdownMenuRadioItem> | ||
<DropdownMenuRadioItem value="bottom">Bottom</DropdownMenuRadioItem> | ||
<DropdownMenuRadioItem value="right">Right</DropdownMenuRadioItem> | ||
</DropdownMenuRadioGroup> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
); | ||
}; | ||
|
||
export function CreateIssue({ isOpen, onClose }: CreateIssueProps) { | ||
return ( | ||
<Dialog open={isOpen} onOpenChange={onClose}> | ||
<DialogContent className=""> | ||
<DialogContent> | ||
<DialogHeader> | ||
<DialogTitle>Create Issue</DialogTitle> | ||
</DialogHeader> | ||
<div className="flex items-center space-x-2"> | ||
<div className="grid flex-1 gap-2"> | ||
<Input | ||
type="text" | ||
placeholder="Title" | ||
/> | ||
<Input type="text" placeholder="Title" /> | ||
</div> | ||
</div> | ||
<div> | ||
<Textarea | ||
placeholder="Click to add description" | ||
/> | ||
<Textarea placeholder="Click to add description" /> | ||
</div> | ||
<div className="flex gap-5 justify-around"> | ||
<Button className="border-2"> | ||
Backlog | ||
</Button> | ||
<Button className="border-2"> | ||
Low | ||
</Button> | ||
<Button className="border-2"> | ||
Assignes | ||
</Button> | ||
<Button className="border-2"> | ||
Sprint | ||
</Button> | ||
<StateDropdown /> | ||
<PriorityDropdown /> | ||
<AssigneesDropdown /> | ||
<Button className="border-2">Sprint</Button> | ||
</div> | ||
<DialogFooter className="" > | ||
<DialogFooter className="flex justify-between"> | ||
<DialogClose asChild> | ||
<Button type="button" variant="secondary" onClick={onClose}> | ||
Close | ||
</Button> | ||
</DialogClose> | ||
<Button className="border-2"> | ||
Create Issue | ||
</Button> | ||
<Button className="border-2">Create Issue</Button> | ||
</DialogFooter> | ||
</DialogContent> | ||
</Dialog> | ||
) | ||
); | ||
} |
This file was deleted.
Oops, something went wrong.