index.tsx 943 B

123456789101112131415161718192021222324252627282930313233
  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. maskColor='var(--color-shadow-shadow-5)'
  19. className='!absolute !left-4 !bottom-14 z-[9] !m-0 !w-[102px] !h-[72px] !border-[0.5px] !border-divider-subtle
  20. !rounded-lg !shadow-md !shadow-shadow-shadow-5 !bg-workflow-minimap-bg'
  21. />
  22. <div className='flex items-center mt-1 gap-2 absolute left-4 bottom-4 z-[9]'>
  23. <ZoomInOut />
  24. <UndoRedo handleUndo={handleUndo} handleRedo={handleRedo} />
  25. <Control />
  26. </div>
  27. </>
  28. )
  29. }
  30. export default memo(Operator)