Select and Context Menu component with storybook and testing

This commit is contained in:
adilallo
2025-10-10 12:07:13 -06:00
parent 2bc5fcdf45
commit 9c72afdc52
20 changed files with 3827 additions and 88 deletions
+30
View File
@@ -0,0 +1,30 @@
"use client";
import React, { forwardRef, memo } from "react";
const ContextMenuSection = forwardRef(
({ title, children, className = "", ...props }, ref) => {
const sectionClasses = `
${className}
`
.trim()
.replace(/\s+/g, " ");
return (
<div ref={ref} className={sectionClasses} role="group" {...props}>
{title && (
<div className="px-3 py-2">
<div className="text-[var(--color-content-default-primary)] text-sm font-medium">
{title}
</div>
</div>
)}
{children}
</div>
);
}
);
ContextMenuSection.displayName = "ContextMenuSection";
export default memo(ContextMenuSection);