index.tsx 400 B

12345678910111213141516171819202122
  1. import React from 'react';
  2. import { Zone } from './styled';
  3. type Props = {
  4. appearance: ToolType | FormType | '';
  5. x: number;
  6. y: number;
  7. };
  8. const Cursor: React.FC<Props> = ({ appearance, x, y }: Props) => {
  9. return (
  10. <Zone
  11. style={{ top: `${y + 5}px`, left: `${x + 5}px` }}
  12. appearance={appearance}
  13. >
  14. <p>Click to insert</p>
  15. </Zone>
  16. );
  17. };
  18. export default Cursor;