diff --git a/packages/@uppy/dashboard/src/Dashboard.jsx b/packages/@uppy/dashboard/src/Dashboard.jsx
index 0c103dcbb..4a4353621 100644
--- a/packages/@uppy/dashboard/src/Dashboard.jsx
+++ b/packages/@uppy/dashboard/src/Dashboard.jsx
@@ -1,4 +1,3 @@
-import { h } from 'preact'
import { UIPlugin } from '@uppy/core'
import StatusBar from '@uppy/status-bar'
import Informer from '@uppy/informer'
@@ -6,6 +5,8 @@ import ThumbnailGenerator from '@uppy/thumbnail-generator'
import findAllDOMElements from '@uppy/utils/lib/findAllDOMElements'
import toArray from '@uppy/utils/lib/toArray'
import getDroppedFiles from '@uppy/utils/lib/getDroppedFiles'
+import { defaultPickerIcon } from '@uppy/provider-views'
+
import { nanoid } from 'nanoid/non-secure'
import memoizeOne from 'memoize-one'
import * as trapFocus from './utils/trapFocus.js'
@@ -29,14 +30,6 @@ function createPromise () {
return o
}
-function defaultPickerIcon () {
- return (
-
- )
-}
-
/**
* Dashboard UI with previews, metadata editing, tabs for various services and more
*/
diff --git a/packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx b/packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx
index c4ccfccbf..be2e1c7dc 100644
--- a/packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx
+++ b/packages/@uppy/provider-views/src/ProviderView/ProviderView.jsx
@@ -41,6 +41,14 @@ function prependPath (path, component) {
return `${path}/${component}`
}
+export function defaultPickerIcon () {
+ return (
+
+ )
+}
+
/**
* Class to easily generate generic views for Provider plugins
*/
@@ -453,11 +461,13 @@ export default class ProviderView extends View {
const { files, folders, filterInput, loading, currentSelection } = this.plugin.getPluginState()
const { isChecked, toggleCheckbox, recordShiftKeyPress, filterItems } = this
const hasInput = filterInput !== ''
+ const pluginIcon = this.plugin.icon || defaultPickerIcon
+
const headerProps = {
showBreadcrumbs: targetViewOptions.showBreadcrumbs,
getFolder: this.getFolder,
breadcrumbs: this.plugin.getPluginState().breadcrumbs,
- pluginIcon: this.plugin.icon,
+ pluginIcon,
title: this.plugin.title,
logout: this.logout,
username: this.username,
@@ -495,7 +505,7 @@ export default class ProviderView extends View {
viewType: targetViewOptions.viewType,
showTitles: targetViewOptions.showTitles,
showBreadcrumbs: targetViewOptions.showBreadcrumbs,
- pluginIcon: this.plugin.icon,
+ pluginIcon,
i18n: this.plugin.uppy.i18n,
uppyFiles: this.plugin.uppy.getFiles(),
validateRestrictions: (...args) => this.plugin.uppy.validateRestrictions(...args),
@@ -514,7 +524,7 @@ export default class ProviderView extends View {