feat(ui): add current block type label to actions menu
This commit is contained in:
@@ -147,6 +147,7 @@ function BlockActionsMenu({
|
||||
open,
|
||||
setOpen,
|
||||
disabled,
|
||||
currentLabel,
|
||||
transformOptions,
|
||||
onMouseDownHandle,
|
||||
getJustDragged,
|
||||
@@ -239,6 +240,11 @@ function BlockActionsMenu({
|
||||
className={`absolute left-0 ${panelPositionClass} w-56 ${BOX_CLASS} z-50 flex flex-col`}
|
||||
>
|
||||
<div className="p-1.5 flex flex-col gap-0.5">
|
||||
{currentLabel && (
|
||||
<div className="px-2 pt-1 pb-1 text-[10px] font-medium uppercase tracking-wider text-neutral-400 dark:text-neutral-500">
|
||||
{currentLabel}
|
||||
</div>
|
||||
)}
|
||||
{transformOptions.length > 0 && (
|
||||
<div ref={submenuTriggerRef} className="relative">
|
||||
<div
|
||||
@@ -663,6 +669,7 @@ const Block = forwardRef(function Block(
|
||||
open={menuOpen}
|
||||
setOpen={setMenuOpen}
|
||||
disabled={disabled}
|
||||
currentLabel={def?.label}
|
||||
transformOptions={transformOptions}
|
||||
onMouseDownHandle={handleHandleMouseDown}
|
||||
getJustDragged={() => {
|
||||
|
||||
Reference in New Issue
Block a user