2D Run-and-gun shooter inspired by One Man's Doomsday, Counter-Strike, and Metal Slug.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

24 lines
593 B

  1. import {forwardRef, HTMLProps, ReactNode} from 'react';
  2. export interface FileButtonProps extends Omit<HTMLProps<HTMLInputElement>, 'type'> {
  3. children?: ReactNode;
  4. }
  5. export const FileButton = forwardRef<HTMLInputElement, FileButtonProps>(({
  6. className = '',
  7. children,
  8. ...etcProps
  9. }, ref) => (
  10. <label className="contents">
  11. <input
  12. {...etcProps}
  13. ref={ref}
  14. type="file"
  15. className="sr-only"
  16. />
  17. <span className={`h-12 px-4 border-2 rounded inline-flex justify-center items-center cursor-pointer ${className}`}>
  18. {children}
  19. </span>
  20. </label>
  21. ))