Spaces:
Configuration error
Configuration error
Download frontend/src/components/features/context-menu/context-menu-list-item.tsx from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 769 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/context-menu/context-menu-list-item.tsx
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/components/features/context-menu/context-menu-list-item.tsx
-
curl -L -o context-menu-list-item.tsx https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/components/features/context-menu/context-menu-list-item.tsx
769 Bytes
| import { cn } from "#/utils/utils"; | |
| interface ContextMenuListItemProps { | |
| testId?: string; | |
| onClick: (event: React.MouseEvent<HTMLButtonElement>) => void; | |
| isDisabled?: boolean; | |
| } | |
| export function ContextMenuListItem({ | |
| children, | |
| testId, | |
| onClick, | |
| isDisabled, | |
| }: React.PropsWithChildren<ContextMenuListItemProps>) { | |
| return ( | |
| <button | |
| data-testid={testId || "context-menu-list-item"} | |
| type="button" | |
| onClick={onClick} | |
| disabled={isDisabled} | |
| className={cn( | |
| "text-sm px-4 py-2 w-full text-start hover:bg-white/10 first-of-type:rounded-t-md last-of-type:rounded-b-md", | |
| "disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-transparent text-nowrap", | |
| )} | |
| > | |
| {children} | |
| </button> | |
| ); | |
| } | |