mirror of
https://github.com/transloadit/uppy.git
synced 2026-07-24 02:38:58 +00:00
fix wrong definition for metaFields property (#1763)
* fix wrong definition for metaFields property * dashboard: add type test for metaFields
This commit is contained in:
parent
0962677c83
commit
2f092da106
2 changed files with 13 additions and 3 deletions
|
|
@ -15,9 +15,13 @@ import Dashboard = require('../')
|
|||
|
||||
{
|
||||
const uppy = Uppy()
|
||||
uppy.use(Dashboard, {
|
||||
uppy.use(Dashboard, <Partial<Dashboard.DashboardOptions>>{
|
||||
width: '100%',
|
||||
height: 700
|
||||
height: 700,
|
||||
metaFields: [
|
||||
{ id: 'caption', name: 'Caption' },
|
||||
{ id: 'license', name: 'License', placeholder: 'Creative Commons, Apache 2.0, ...' },
|
||||
]
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
8
packages/@uppy/dashboard/types/index.d.ts
vendored
8
packages/@uppy/dashboard/types/index.d.ts
vendored
|
|
@ -1,5 +1,11 @@
|
|||
import Uppy = require('@uppy/core');
|
||||
|
||||
interface MetaField {
|
||||
id: string;
|
||||
name: string;
|
||||
placeholder?: string;
|
||||
}
|
||||
|
||||
declare module Dashboard {
|
||||
interface DashboardOptions extends Uppy.PluginOptions {
|
||||
onRequestCloseModal: () => void;
|
||||
|
|
@ -14,7 +20,7 @@ declare module Dashboard {
|
|||
note: string;
|
||||
showLinkToFileUploadResult: boolean;
|
||||
proudlyDisplayPoweredByUppy: boolean;
|
||||
metaFields: string[];
|
||||
metaFields: MetaField[];
|
||||
plugins: string[];
|
||||
disableStatusBar: boolean;
|
||||
showProgressDetails: boolean;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue