temp fix for code issue on nodeToolbar
This commit is contained in:
parent
a9cb30c378
commit
7d3c21e608
1 changed files with 33 additions and 29 deletions
|
|
@ -197,18 +197,20 @@ export default function NodeToolbarComponent({
|
|||
};
|
||||
|
||||
const [openModal, setOpenModal] = useState(false);
|
||||
const hasCode = Object.keys(data.node!.template).includes("code");
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="w-26 h-10">
|
||||
<span className="isolate inline-flex rounded-md shadow-sm">
|
||||
{hasCode && (
|
||||
<ShadTooltip content="Code" side="top">
|
||||
<button
|
||||
className="relative inline-flex items-center rounded-l-md bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10"
|
||||
onClick={() => {
|
||||
setOpenModal(!openModal);
|
||||
}}
|
||||
data-testid="delete-button-modal"
|
||||
data-testid="code-button-modal"
|
||||
>
|
||||
<div className="hidden">
|
||||
<CodeAreaComponent
|
||||
|
|
@ -230,11 +232,13 @@ export default function NodeToolbarComponent({
|
|||
<IconComponent name="Code2" className="h-4 w-4" />
|
||||
</button>
|
||||
</ShadTooltip>
|
||||
)}
|
||||
|
||||
<ShadTooltip content="Duplicate" side="top">
|
||||
<button
|
||||
className={classNames(
|
||||
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10"
|
||||
"relative -ml-px inline-flex items-center bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10",
|
||||
hasCode ? "" : "rounded-l-md"
|
||||
)}
|
||||
onClick={(event) => {
|
||||
event.preventDefault();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue