index.tsx 831 B

12345678910111213141516171819202122232425262728293031
  1. import { memo } from 'react'
  2. import { MiniMap } from 'reactflow'
  3. import UndoRedo from '../header/undo-redo'
  4. import ZoomInOut from './zoom-in-out'
  5. import Control from './control'
  6. export type OperatorProps = {
  7. handleUndo: () => void
  8. handleRedo: () => void
  9. }
  10. const Operator = ({ handleUndo, handleRedo }: OperatorProps) => {
  11. return (
  12. <>
  13. <MiniMap
  14. style={{
  15. width: 102,
  16. height: 72,
  17. }}
  18. className='!absolute !left-4 !bottom-14 z-[9] !m-0 !w-[102px] !h-[72px] !border-[0.5px] !border-black/8 !rounded-lg !shadow-lg'
  19. />
  20. <div className='flex items-center mt-1 gap-2 absolute left-4 bottom-4 z-[9]'>
  21. <ZoomInOut />
  22. <UndoRedo handleUndo={handleUndo} handleRedo={handleRedo} />
  23. <Control />
  24. </div>
  25. </>
  26. )
  27. }
  28. export default memo(Operator)