import * as React from "react"; import UploadButton, { asUploadButton, UploadButtonProps } from "./index"; const TestButton: React.FC = () => { const btnRef = React.useRef(null); return upload ; }; const testMyButton = (): React.JSX.Element => { return ; }; interface DivUploadButtonExtraProps { className?: string; id?: string; children?: React.JSX.Element[] | React.JSX.Element | string; text?: string; foo: string; } const DivUploadButton: React.ComponentType> = asUploadButton(React.forwardRef((props: DivUploadButtonExtraProps, ref: React.Ref) => { const clickHandler: React.MouseEventHandler = React.useCallback((e) => { console.log(e.target); }, []); return
{props.children}
; })); const TestDivButton: React.FC = () => { const divRef = React.useRef(null); return This is a DIV Button ; }; const DivUploadButtonWithoutRef: React.ComponentType> = asUploadButton((props: DivUploadButtonExtraProps) => { return
{props.children}
; }); const TestDivButtonWithoutRef: React.FC = () => { return This is a DIV Button without Ref ; }; interface LiUploadButtonExtraProps { id: string } const LiUploadButton = asUploadButton((props: LiUploadButtonExtraProps) => { return
  • Upload Files
  • ; }); const TestLiButtonWithoutRef: React.FC = () => { return This is a LI Button without Ref ; }; const testAsButton = (): React.JSX.Element => { return ; }; const testAsButtonWithoutRef = (): React.JSX.Element => { return <> ; }; export { testMyButton, testAsButton, testAsButtonWithoutRef, };