Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.
dropdown changed from popover component to select component
doppedheart02cb48d814dd
diff --git a/app/(static)/deck/components/DropdownProto.tsx b/app/(static)/deck/components/DropdownProto.tsxindex 7634cdca..8ad35875 100644--- a/app/(static)/deck/components/DropdownProto.tsx+++ b/app/(static)/deck/components/DropdownProto.tsx@@ -1,12 +1,13 @@-import { Button } from "@/components/ui/button";-import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";+import { CheckIcon} from "lucide-react";import { Dispatch, SetStateAction, useState } from "react";-import { PopoverContent } from "@radix-ui/react-popover";-import { PopoverTrigger, Popover } from "@/components/ui/popover";--function classNames(...classes: string[]) {- return classes.filter(Boolean).join(" ");-}+import * as React from "react"+import {+ Select,+ SelectContent,+ SelectTrigger,+ SelectValue,+} from "@/components/ui/select"+import { cn } from "@/lib/utils";interface DropDownProps {options: string[];@@ -36,35 +37,20 @@ export default function DropDown({setMenuOpen(true); // Open the dropdown}};-return (- <Popover open={menuOpen} onOpenChange={handleMenuStateChange}>- <PopoverTrigger asChild>- <Button- variant="outline"- className="h-8 bg-transparent w-full flex justify-between px-4 py-6"- >- <div>- {option}- </div>- {menuOpen ? <ChevronUpIcon- className="-mr-1 ml-2 h-5 w-5"- aria-hidden="true"- /> : <ChevronDownIcon- className="-mr-1 ml-2 h-5 w-5"- aria-hidden="true"- />}- </Button>- </PopoverTrigger>- <PopoverContent className="w-[--radix-popover-trigger-width] max-h-[--radix-popover-content-available-height] z-10 bg-white shadow-lg ring-1 ring-black ring-opacity-5">+ <Select open={menuOpen} onOpenChange={handleMenuStateChange}>+ <SelectTrigger className="inline-flex w-full justify-between items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-gray-400 font-light shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-blue text-base">+ <SelectValue placeholder={option}/>+ </SelectTrigger>+ <SelectContent>{options.map((optionItem) => (<buttononClick={() => {setOption(optionItem)setMenuOpen(false)}}- className={classNames(- option === optionItem ? "bg-gray-200" : "",+ className={cn(+ option === optionItem ? "bg-gray-200" : "hover:bg-gray-100","px-4 py-2 text-sm w-full text-left flex items-center space-x-2 justify-between",)}>@@ -74,7 +60,8 @@ export default function DropDown({) : null}</button>))}- </PopoverContent>- </Popover>+ </SelectContent>+ </Select>)-}\ No newline at end of file+}+