feat(file-uploader): make labelTitle, labelDescription slottable (#1780)

This commit is contained in:
Eric Liu 2023-07-23 12:25:31 -07:00 committed by GitHub
commit 239f1b10e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 36 deletions

View file

@ -35,17 +35,19 @@ export interface FileUploaderProps extends RestProps {
multiple?: boolean;
/**
* Specify the label description
* @default ""
*/
labelDescription?: string;
/**
* Specify the label title
* Specify the label title.
* Alternatively, use the named slot "labelTitle" (e.g., `<span slot="labelTitle">...</span>`)
* @default ""
*/
labelTitle?: string;
/**
* Specify the label description.
* Alternatively, use the named slot "labelDescription" (e.g., `<span slot="labelDescription">...</span>`)
* @default ""
*/
labelDescription?: string;
/**
* Specify the kind of file uploader button
* @default "primary"
@ -85,7 +87,7 @@ export default class FileUploader extends SvelteComponentTyped<
mouseleave: WindowEventMap["mouseleave"];
keydown: WindowEventMap["keydown"];
},
{}
{ labelDescription: {}; labelTitle: {} }
> {
/**
* Programmatically clear the uploaded files