mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 02:11:05 +00:00
feat(file-uploader): add size
prop to FileUploaderButton
(#1786)
This commit is contained in:
parent
709322c281
commit
51c281de4a
8 changed files with 70 additions and 5 deletions
|
@ -3830,6 +3830,18 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"kind": "let",
|
||||
"description": "Specify the size of the file uploader button",
|
||||
"type": "import(\"../Button/Button.svelte\").ButtonProps[\"size\"]",
|
||||
"value": "\"small\"",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "buttonLabel",
|
||||
"kind": "let",
|
||||
|
@ -3983,6 +3995,18 @@
|
|||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "size",
|
||||
"kind": "let",
|
||||
"description": "Specify the size of the file uploader button",
|
||||
"type": "import(\"../Button/Button.svelte\").ButtonProps[\"size\"]",
|
||||
"value": "\"small\"",
|
||||
"isFunction": false,
|
||||
"isFunctionDeclaration": false,
|
||||
"isRequired": false,
|
||||
"constant": false,
|
||||
"reactive": false
|
||||
},
|
||||
{
|
||||
"name": "labelText",
|
||||
"kind": "let",
|
||||
|
|
|
@ -13,13 +13,22 @@ By default, the file uploader only accepts one file.
|
|||
|
||||
Set `multiple` to `true` for multiple files to be accepted.
|
||||
|
||||
<FileUploaderButton labelText="Add files" />
|
||||
<FileUploaderButton labelText="Add file" />
|
||||
|
||||
## Custom button kind
|
||||
## Multiple files
|
||||
|
||||
By default, the `primary` button kind is used.
|
||||
<FileUploaderButton multiple labelText="Add files" />
|
||||
|
||||
<FileUploaderButton kind="secondary" labelText="Add files" />
|
||||
## Custom button kind, size
|
||||
|
||||
By default, the `primary` small button kind is used.
|
||||
|
||||
Use the `kind` and `size` props to customize the button.
|
||||
|
||||
<FileUploaderButton kind="secondary" size="field" />
|
||||
<FileUploaderButton kind="tertiary" size="default" />
|
||||
<FileUploaderButton kind="danger" size="lg" />
|
||||
<FileUploaderButton kind="danger-tertiary" size="xl" />
|
||||
|
||||
## File uploader
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue