From 0baf167ed16bfcd0c7a0fdd3f31abbf96948d5f9 Mon Sep 17 00:00:00 2001
From: "Hahn Axel (hahn)" <axel.hahn@iml.unibe.ch>
Date: Mon, 12 Dec 2022 11:54:05 +0100
Subject: [PATCH] add docs for infobox

---
 docs/50_Components/Infobox.md   | 46 +++++++++++++++++++++++++++++++++
 public_html/pages/component.php |  3 ++-
 2 files changed, 48 insertions(+), 1 deletion(-)
 create mode 100644 docs/50_Components/Infobox.md

diff --git a/docs/50_Components/Infobox.md b/docs/50_Components/Infobox.md
new file mode 100644
index 0000000..e411d55
--- /dev/null
+++ b/docs/50_Components/Infobox.md
@@ -0,0 +1,46 @@
+## Infobox
+
+A div box - kind of a tile - to show an icon, text, value; optional with a progress bar.
+
+### Syntax
+
+```php
+$renderAdminLTE->getCard($aOptions);
+```
+
+### Parameters
+
+* $aOptions - {array} options to describe the element
+
+Styling:
+
+Key      | Description
+---      | ---
+type     | one of [none]\|danger\|dark\|info\|primary\|secondary\|success\|warning
+shadow   | size of shadow; one of [none] (=default: between small and regular)|none|small|regular|large 
+iconbg   | background color or type of icon; use it for default type (type="")
+
+Content:
+
+Key           | Description
+---           | ---
+icon          | icon css class; eg. fontawesome "far fa-thumbs-up"
+text          | visible text
+number        | Value as string, eg. to format large integers
+progressvalue | optional: integer: progress bar; range: 0..100
+progresstext  | optional: text below progress bar
+
+### Example
+
+```php
+$renderAdminLTE->getInfobox(array (
+  'type' => 'success',
+  'bgcolor' => '',
+  'shadow' => '',
+  'icon' => 'far fa-thumbs-up',
+  'text' => 'Likes',
+  'number' => '41,410',
+  'progressvalue' => 70,
+  'progresstext' => '70% Increase in 30 Days',
+))
+```
diff --git a/public_html/pages/component.php b/public_html/pages/component.php
index b41af1b..eefcb52 100644
--- a/public_html/pages/component.php
+++ b/public_html/pages/component.php
@@ -14,7 +14,8 @@ $aComponents=[
                 'description'=>'Success infobox with progress',
                 'params'=>[
                     'type'=>'success',
-                    'bgcolor'=>'',
+                    'iconbg'=>'',
+                    'shadow'=>'',
                     'icon'=>'far fa-thumbs-up',
                     'text'=>'Likes',
                     'number'=>"41,410",
-- 
GitLab