add default and advanced view items into dropdown

This commit is contained in:
Eduard Gert
2026-05-20 09:39:35 +02:00
parent bec4eb326a
commit b79b62bee4
4 changed files with 85 additions and 14 deletions

View File

@@ -1,9 +1,8 @@
import { ComponentType, forwardRef } from "react";
import { motion, HTMLMotionProps } from "framer-motion";
import { ButtonHTMLAttributes, ComponentType, forwardRef } from "react";
import { LucideProps } from "lucide-react";
import { cn } from "@/lib/cn";
type Props = HTMLMotionProps<"button"> & {
type Props = ButtonHTMLAttributes<HTMLButtonElement> & {
icon: ComponentType<LucideProps>;
iconSize?: number;
iconClassName?: string;
@@ -14,10 +13,9 @@ export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButt
ref,
) {
return (
<motion.button
<button
ref={ref}
type={type}
whileTap={{ scale: 0.95 }}
className={cn(
"h-10 w-10 flex items-center justify-center rounded-lg cursor-default outline-none",
"text-nb-gray-400 hover:text-nb-gray-300 hover:bg-nb-gray-900",
@@ -27,6 +25,6 @@ export const IconButton = forwardRef<HTMLButtonElement, Props>(function IconButt
{...props}
>
<Icon size={iconSize} className={iconClassName} />
</motion.button>
</button>
);
});