From 69772345c4023effb22522752ed1cd3c48cea2f9 Mon Sep 17 00:00:00 2001 From: Eric Liu Date: Mon, 21 Feb 2022 08:48:58 -0800 Subject: [PATCH] Run "yarn build:docs" --- COMPONENT_INDEX.md | 1 + docs/src/COMPONENT_API.json | 11 +++++++++++ types/FileUploader/FileUploaderButton.svelte.d.ts | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 49d2ea44..7786e83f 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1300,6 +1300,7 @@ None. | :------------------ | :--------------- | :------- | :----------------------------------------------------------------------------------------- | ------------------------------------------------ | -------------------------------------------- | | ref | let | Yes | null | HTMLInputElement | null | Obtain a reference to the input HTML element | | labelText | let | Yes | string | "Add file" | Specify the label text | +| files | let | Yes | File[] | [] | Obtain the uploaded file names | | accept | let | No | string[] | [] | Specify the accepted file types | | multiple | let | No | boolean | false | Set to `true` to allow multiple files | | disabled | let | No | boolean | false | Set to `true` to disable the input | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index d908e0c6..5ee9baf1 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -3607,6 +3607,17 @@ "constant": false, "reactive": false }, + { + "name": "files", + "kind": "let", + "description": "Obtain the uploaded file names", + "type": "File[]", + "value": "[]", + "isFunction": false, + "isFunctionDeclaration": false, + "constant": false, + "reactive": true + }, { "name": "multiple", "kind": "let", diff --git a/types/FileUploader/FileUploaderButton.svelte.d.ts b/types/FileUploader/FileUploaderButton.svelte.d.ts index 86b58f80..24461c0e 100644 --- a/types/FileUploader/FileUploaderButton.svelte.d.ts +++ b/types/FileUploader/FileUploaderButton.svelte.d.ts @@ -9,6 +9,12 @@ export interface FileUploaderButtonProps */ accept?: string[]; + /** + * Obtain the uploaded file names + * @default [] + */ + files?: File[]; + /** * Set to `true` to allow multiple files * @default false