mirror of
https://github.com/apache/superset.git
synced 2026-08-05 13:32:41 +00:00
feat(build): migrate from Prettier to Oxfmt for docs
Signed-off-by: hainenber <dotronghai96@gmail.com>
This commit is contained in:
@@ -33,44 +33,41 @@ Upload component for file selection and uploading. Supports drag-and-drop, multi
|
||||
<StoryWithControls
|
||||
component="Upload"
|
||||
props={{
|
||||
multiple: false,
|
||||
disabled: false,
|
||||
listType: "text",
|
||||
showUploadList: true
|
||||
}}
|
||||
multiple: false,
|
||||
disabled: false,
|
||||
listType: 'text',
|
||||
showUploadList: true,
|
||||
}}
|
||||
controls={[
|
||||
{
|
||||
name: "multiple",
|
||||
label: "Multiple",
|
||||
type: "boolean",
|
||||
description: "Support multiple file selection."
|
||||
},
|
||||
{
|
||||
name: "disabled",
|
||||
label: "Disabled",
|
||||
type: "boolean",
|
||||
description: "Disable the upload button."
|
||||
},
|
||||
{
|
||||
name: "listType",
|
||||
label: "List Type",
|
||||
type: "select",
|
||||
options: [
|
||||
"text",
|
||||
"picture",
|
||||
"picture-card",
|
||||
"picture-circle"
|
||||
],
|
||||
description: "Built-in style for the file list display."
|
||||
},
|
||||
{
|
||||
name: "showUploadList",
|
||||
label: "Show Upload List",
|
||||
type: "boolean",
|
||||
description: "Whether to show the upload file list."
|
||||
}
|
||||
]}
|
||||
sampleChildren={[{"component":"Button","props":{"children":"Click to Upload"}}]}
|
||||
{
|
||||
name: 'multiple',
|
||||
label: 'Multiple',
|
||||
type: 'boolean',
|
||||
description: 'Support multiple file selection.',
|
||||
},
|
||||
{
|
||||
name: 'disabled',
|
||||
label: 'Disabled',
|
||||
type: 'boolean',
|
||||
description: 'Disable the upload button.',
|
||||
},
|
||||
{
|
||||
name: 'listType',
|
||||
label: 'List Type',
|
||||
type: 'select',
|
||||
options: ['text', 'picture', 'picture-card', 'picture-circle'],
|
||||
description: 'Built-in style for the file list display.',
|
||||
},
|
||||
{
|
||||
name: 'showUploadList',
|
||||
label: 'Show Upload List',
|
||||
type: 'boolean',
|
||||
description: 'Whether to show the upload file list.',
|
||||
},
|
||||
]}
|
||||
sampleChildren={[
|
||||
{ component: 'Button', props: { children: 'Click to Upload' } },
|
||||
]}
|
||||
/>
|
||||
|
||||
## Try It
|
||||
@@ -91,11 +88,7 @@ function Demo() {
|
||||
|
||||
```tsx live
|
||||
function PictureCard() {
|
||||
return (
|
||||
<Upload listType="picture-card">
|
||||
+ Upload
|
||||
</Upload>
|
||||
);
|
||||
return <Upload listType="picture-card">+ Upload</Upload>;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -115,12 +108,12 @@ function DragDrop() {
|
||||
|
||||
## Props
|
||||
|
||||
| Prop | Type | Default | Description |
|
||||
|------|------|---------|-------------|
|
||||
| `multiple` | `boolean` | `false` | Support multiple file selection. |
|
||||
| `disabled` | `boolean` | `false` | Disable the upload button. |
|
||||
| `listType` | `string` | `"text"` | Built-in style for the file list display. |
|
||||
| `showUploadList` | `boolean` | `true` | Whether to show the upload file list. |
|
||||
| Prop | Type | Default | Description |
|
||||
| ---------------- | --------- | -------- | ----------------------------------------- |
|
||||
| `multiple` | `boolean` | `false` | Support multiple file selection. |
|
||||
| `disabled` | `boolean` | `false` | Disable the upload button. |
|
||||
| `listType` | `string` | `"text"` | Built-in style for the file list display. |
|
||||
| `showUploadList` | `boolean` | `true` | Whether to show the upload file list. |
|
||||
|
||||
## Import
|
||||
|
||||
|
||||
Reference in New Issue
Block a user