mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-20 12:23:02 +00:00
feat(file-uploader): add disabled prop
This commit is contained in:
parent
2dded2fa06
commit
85696ed649
1 changed files with 16 additions and 2 deletions
|
@ -11,6 +11,9 @@
|
||||||
*/
|
*/
|
||||||
export let status = "uploading";
|
export let status = "uploading";
|
||||||
|
|
||||||
|
/** Set to `true` to disable the file uploader */
|
||||||
|
export let disabled = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the accepted file types
|
* Specify the accepted file types
|
||||||
* @type {string[]}
|
* @type {string[]}
|
||||||
|
@ -99,9 +102,20 @@
|
||||||
on:mouseenter
|
on:mouseenter
|
||||||
on:mouseleave
|
on:mouseleave
|
||||||
>
|
>
|
||||||
<p class:bx--file--label="{true}">{labelTitle}</p>
|
<p
|
||||||
<p class:bx--label-description="{true}">{labelDescription}</p>
|
class:bx--file--label="{true}"
|
||||||
|
class:bx--label-description--disabled="{disabled}"
|
||||||
|
>
|
||||||
|
{labelTitle}
|
||||||
|
</p>
|
||||||
|
<p
|
||||||
|
class:bx--label-description="{true}"
|
||||||
|
class:bx--label-description--disabled="{disabled}"
|
||||||
|
>
|
||||||
|
{labelDescription}
|
||||||
|
</p>
|
||||||
<FileUploaderButton
|
<FileUploaderButton
|
||||||
|
disabled="{disabled}"
|
||||||
disableLabelChanges
|
disableLabelChanges
|
||||||
labelText="{buttonLabel}"
|
labelText="{buttonLabel}"
|
||||||
accept="{accept}"
|
accept="{accept}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue