index.tsx 801 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. import React from 'react';
  2. import Markup from './styled';
  3. type Props = {
  4. id?: string;
  5. position: Record<string, number>;
  6. bdcolor: string;
  7. opacity: number;
  8. markupType: string;
  9. isCovered?: boolean;
  10. scale: number;
  11. onMouseOver?: () => void;
  12. onMouseOut?: () => void;
  13. };
  14. const index: React.FC<Props> = ({
  15. id,
  16. position,
  17. bdcolor,
  18. opacity,
  19. markupType,
  20. isCovered,
  21. scale,
  22. onMouseOver,
  23. onMouseOut,
  24. }: Props) => (
  25. <Markup
  26. id={id}
  27. position={position}
  28. bdcolor={bdcolor}
  29. opacity={opacity}
  30. markupType={markupType}
  31. isCovered={isCovered}
  32. scale={scale}
  33. onMouseOver={onMouseOver}
  34. onMouseOut={onMouseOut}
  35. onFocus={() => {
  36. /* to do something */
  37. }}
  38. onBlur={() => {
  39. /* to do something */
  40. }}
  41. />
  42. );
  43. export default index;