فهرست منبع

docs: Add Informer docs page.

Renée Kooi 7 سال پیش
والد
کامیت
1af74f0be5
2فایلهای تغییر یافته به همراه32 افزوده شده و 1 حذف شده
  1. 31 0
      website/src/docs/informer.md
  2. 1 1
      website/src/docs/plugins.md

+ 31 - 0
website/src/docs/informer.md

@@ -0,0 +1,31 @@
+---
+type: docs
+order: 24
+title: "Informer"
+permalink: docs/informer/
+---
+
+The Informer is a pop-up bar for showing notifications. When plugins have some exciting news (or error) to share, they can show a notification here.
+
+[Try it live](/examples/dashboard/) - The Informer is included in the Dashboard by default.
+
+## Options
+
+### `target: null`
+
+DOM element, CSS selector, or plugin to mount the informer into.
+
+### `typeColors: {}`
+
+Customize the background and foreground colors for different types of notifications. Supported types are `info`, `warning`, `error`, and `success`. To customize colors, pass an object containing `{ bg, text }` color pairs for each type of notification:
+
+```js
+uppy.use(Informer, {
+  typeColors: {
+    info:    { text: '#fff', bg: '#000000' },
+    warning: { text: '#fff', bg: '#f6a623' },
+    error:   { text: '#fff', bg: '#e74c3c' },
+    success: { text: '#fff', bg: '#7ac824' }
+  }
+})
+```

+ 1 - 1
website/src/docs/plugins.md

@@ -19,7 +19,7 @@ Plugins are what makes Uppy useful: they help select, manipulate and upload file
 - **Progress:**
 - **Progress:**
   - [ProgressBar](/docs/progressbar) — add a small YouTube-style progress bar at the top of the page
   - [ProgressBar](/docs/progressbar) — add a small YouTube-style progress bar at the top of the page
   - [StatusBar](/docs/statusbar) — advanced upload progress status bar
   - [StatusBar](/docs/statusbar) — advanced upload progress status bar
-  - Informer — show notifications
+  - [Informer](/docs/informer) — show notifications
 - **Helpers:**
 - **Helpers:**
   - [GoldenRetriever](/docs/golden-retriever) — restore files and continue uploading after a page refresh or a browser crash
   - [GoldenRetriever](/docs/golden-retriever) — restore files and continue uploading after a page refresh or a browser crash
 - **Encoding Services:**
 - **Encoding Services:**