UNPKG

@jsxtools/aui

Version:

A baseline UI as Mixins, Custom Elements, React Components, etc.

1 lines 654 B
import{without}from"./_without.js";import{customElements}from"../api/dom.js";import{FileElement}from"../elements/file.js";import{TransferFile}from"../mixins/file.js";import{createElement,useCallback}from"react";customElements.define("a-file",FileElement);var FileComponent=({ref,...props})=>createElement("a-file",{...without(props,"maxSize","types","value"),ref:useCallback((current)=>{if(current){if("maxSize"in props)current.maxSize=props.maxSize;if("types"in props)current.types=props.types}if(typeof ref==="function")ref(current);else if(ref&&"current"in ref)ref.current=current},[props.maxSize,props.types,ref])});export{TransferFile,FileComponent}