Document `<woltlab-core-notice>`
authorMarcel Werk <burntime@woltlab.com>
Sat, 4 May 2024 10:13:14 +0000 (12:13 +0200)
committerMarcel Werk <burntime@woltlab.com>
Sat, 4 May 2024 10:13:14 +0000 (12:13 +0200)
Closes #405

docs/javascript/components_notice.md [new file with mode: 0644]
mkdocs.yml

diff --git a/docs/javascript/components_notice.md b/docs/javascript/components_notice.md
new file mode 100644 (file)
index 0000000..0a153a5
--- /dev/null
@@ -0,0 +1,17 @@
+# Notices - JavaScript API
+
+The notice component can be used to show text notices for the user.
+The type of the notice can be controlled depending on the `type` parameter.
+
+## Example
+
+```html
+<woltlab-core-notice type="info">Hello World!</woltlab-core-notice>
+```
+
+## Parameters
+
+### `type`
+
+Controls the type of a notice (color and displayed icon).
+The following values are available: `info`, `success`, `warning`, `error`
index 02e74b73814a461491311f076d7723e21e7e0ed7..eecf3247e7e046a75e76a8d1529444b841a1adfd 100644 (file)
@@ -62,6 +62,7 @@ nav:
           - 'Confirmation': 'javascript/components_confirmation.md'
           - 'Dialog': 'javascript/components_dialog.md'
           - 'Google Maps': 'javascript/components_google_maps.md'
+          - 'Notices': 'javascript/components_notice.md'
           - 'Pagination': 'javascript/components_pagination.md'
       - 'New API':
           - 'Writing a module': 'javascript/new-api_writing-a-module.md'