We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This would be a simple material like action button. I know it's not too bad to make your own but I think this would be nice to have.
Dropdown
Something like this:
I already made my own, and want to contribute if this would fit with shadcn/ui
This is what I have so far. I'm not the best a programming but it works.
import * as React from "react"; import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu"; import { cn } from "@/lib/utils"; const ActionMenu = DropdownMenuPrimitive.Root; const ActionMenuTrigger = DropdownMenuPrimitive.Trigger; const ActionMenuContent = React.forwardRef< React.ElementRef<typeof DropdownMenuPrimitive.Content>, React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> >(({ className, sideOffset = 4, ...props }, ref) => ( <DropdownMenuPrimitive.Portal> <DropdownMenuPrimitive.Content ref={ref} sideOffset={sideOffset} className={cn( "bg-popover text-popover-foreground z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-md", "animate-in fade-in-0 zoom-in-95 duration-100", "data-[side=bottom]:slide-in-from-top-2", "data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2", "data-[side=top]:slide-in-from-bottom-2", className, )} {...props} /> </DropdownMenuPrimitive.Portal> )); ActionMenuContent.displayName = DropdownMenuPrimitive.Content.displayName; const ActionMenuItem = React.forwardRef< React.ElementRef<typeof DropdownMenuPrimitive.Item>, React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> >(({ className, ...props }, ref) => ( <DropdownMenuPrimitive.Item ref={ref} className={cn( "relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none", "transition-colors duration-100", "focus:bg-accent focus:text-accent-foreground", "data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className, )} {...props} /> )); ActionMenuItem.displayName = DropdownMenuPrimitive.Item.displayName; export { ActionMenu, ActionMenuTrigger, ActionMenuContent, ActionMenuItem };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Feature description
This would be a simple material like action button. I know it's not too bad to make your own but I think this would be nice to have.
Affected component/components
Dropdown
Additional Context
Something like this:
I already made my own, and want to contribute if this would fit with shadcn/ui
This is what I have so far. I'm not the best a programming but it works.
Before submitting
The text was updated successfully, but these errors were encountered: