index.tsx 421 B

12345678910111213141516171819
  1. import React, { forwardRef } from 'react';
  2. import { Wrapper } from './styled';
  3. type Props = {
  4. onMouseDown: () => void;
  5. onKeyDown: (e: React.KeyboardEvent) => void;
  6. children: React.ReactNode;
  7. };
  8. type Ref = HTMLDivElement;
  9. const index = forwardRef<Ref, Props>(({ children, ...rest }: Props, ref) => (
  10. <Wrapper ref={ref} tabIndex={0} role="form" {...rest}>
  11. {children}
  12. </Wrapper>
  13. ));
  14. export default index;