Add side actions for insertin new / editing blocks

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-03-23 10:28:19 +04:00
parent 21eb2e5197
commit 34d64ecb75
9 changed files with 749 additions and 151 deletions

View File

@@ -0,0 +1,28 @@
import { tv } from "tailwind-variants";
const menuButtonVariants = tv({
base: ["px-2 py-1 text-sm rounded-sm font-semibold bg-level-0 hover:bg-subtle"],
variants: {
active: {
true: ["bg-active"],
},
},
});
type MenuButtonProps = {
label: string;
active?: boolean;
onClick: () => void;
};
export function MenuButton({ label, active, onClick }: MenuButtonProps) {
return (
<button
type="button"
onClick={onClick}
className={menuButtonVariants({ active })}
>
{label}
</button>
);
}