2
0

feat(editor): ️ Optimize graph navigation

This commit is contained in:
Baptiste Arnaud
2022-06-26 16:12:28 +02:00
parent d7b9bda5d5
commit fc4db575ac
17 changed files with 497 additions and 311 deletions

View File

@ -1,12 +1,13 @@
import { Stack, IconButton } from '@chakra-ui/react'
import { PlusIcon, MinusIcon } from 'assets/icons'
import { memo } from 'react'
import { headerHeight } from '../TypebotHeader'
type Props = {
onZoomIn: () => void
onZoomOut: () => void
}
export const ZoomButtons = ({ onZoomIn, onZoomOut }: Props) => (
export const ZoomButtons = memo(({ onZoomIn, onZoomOut }: Props) => (
<Stack
pos="fixed"
top={`calc(${headerHeight}px + 70px)`}
@ -34,4 +35,4 @@ export const ZoomButtons = ({ onZoomIn, onZoomOut }: Props) => (
borderTopRadius={0}
/>
</Stack>
)
))