feat(editor): ✨ Add unlock/lock sidebar
This commit is contained in:
@ -94,6 +94,7 @@ export const ChoiceItemNode = ({
|
||||
>
|
||||
{(ref, isOpened) => (
|
||||
<Flex
|
||||
ref={ref}
|
||||
align="center"
|
||||
pos="relative"
|
||||
onMouseEnter={handleMouseEnter}
|
||||
@ -109,7 +110,6 @@ export const ChoiceItemNode = ({
|
||||
borderColor={isOpened ? 'blue.400' : 'gray.300'}
|
||||
>
|
||||
<Editable
|
||||
ref={ref}
|
||||
defaultValue={item.content ?? 'Click to edit'}
|
||||
flex="1"
|
||||
startWithEditView={!isDefined(item.content)}
|
||||
|
@ -27,7 +27,7 @@ export const ContentPopover = ({ step }: Props) => {
|
||||
|
||||
return (
|
||||
<Portal>
|
||||
<PopoverContent onMouseDown={handleMouseDown}>
|
||||
<PopoverContent onMouseDown={handleMouseDown} w="500px">
|
||||
<PopoverArrow />
|
||||
<PopoverBody ref={ref} shadow="lg">
|
||||
<StepContent step={step} />
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import React, { useEffect, useState } from 'react'
|
||||
import { BubbleStep, DraggableStep, Step, TextBubbleStep } from 'models'
|
||||
import { Coordinates, useGraph } from 'contexts/GraphContext'
|
||||
import { StepIcon } from 'components/board/StepTypesList/StepIcon'
|
||||
import { StepIcon } from 'components/board/StepsSideBar/StepIcon'
|
||||
import { isBubbleStep, isTextBubbleStep } from 'utils'
|
||||
import { TextEditor } from './TextEditor/TextEditor'
|
||||
import { StepNodeContent } from './StepNodeContent/StepNodeContent'
|
||||
@ -152,7 +152,7 @@ export const StepNode = ({
|
||||
renderMenu={() => <StepNodeContextMenu stepId={step.id} />}
|
||||
>
|
||||
{(ref, isOpened) => (
|
||||
<Popover placement="left" isLazy isOpen={openedStepId === step.id}>
|
||||
<Popover placement="bottom" isLazy isOpen={openedStepId === step.id}>
|
||||
<PopoverTrigger>
|
||||
<Flex
|
||||
pos="relative"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { StackProps, HStack } from '@chakra-ui/react'
|
||||
import { StartStep, Step } from 'models'
|
||||
import { StepIcon } from 'components/board/StepTypesList/StepIcon'
|
||||
import { StepIcon } from 'components/board/StepsSideBar/StepIcon'
|
||||
import { StepNodeContent } from './StepNodeContent/StepNodeContent'
|
||||
|
||||
export const StepNodeOverlay = ({
|
||||
|
Reference in New Issue
Block a user