diff --git a/src/components/File/File.tsx b/src/components/File/File.tsx index 5335f98..6e21c3c 100644 --- a/src/components/File/File.tsx +++ b/src/components/File/File.tsx @@ -1,11 +1,20 @@ import './File.sass' import { FileField } from '@kobalte/core/file-field' -export default () => { +interface Props { + maxFiles: number + accept: string + onFileAccept?: (files: File[]) => void + label: string + buttonText: string + onClick: () => void +} + +export default (props: Props) => { return ( <> - console.log('data', data)} onFileReject={(data) => console.log('data', data)} onFileChange={(data) => console.log('data', data)}> - Drag and drop or click to upload file + + {props.label} {() => ( @@ -13,7 +22,9 @@ export default () => { - Delete + + {props.buttonText} + )}