summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorSukanya Pandey <sukapan1@in.ibm.com>2020-11-27 11:29:30 +0300
committerSukanya Pandey <sukapan1@in.ibm.com>2020-12-16 17:43:25 +0300
commit0f22907a4163d6cb84c1cb7c024b09db888e88b2 (patch)
tree9c49e88e89a3bbaeccbdc492c3b7150b1e49cdb7 /docs
parentc5c2ae99f6e9b91526ea5896b3029ab8a7480c6f (diff)
downloadwebui-vue-0f22907a4163d6cb84c1cb7c024b09db888e88b2.tar.xz
Add form file documentation
Signed-off-by: Sukanya Pandey <sukapan1@in.ibm.com> Change-Id: I578ead17e5870ae0981aba775c258b49d697a208
Diffstat (limited to 'docs')
-rw-r--r--docs/.vuepress/config.js1
-rw-r--r--docs/guide/components/file-upload/formfile.pngbin0 -> 7496 bytes
-rw-r--r--docs/guide/components/file-upload/readme.md28
3 files changed, 29 insertions, 0 deletions
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 45e5088a..616f6dd8 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -49,6 +49,7 @@ module.exports = {
"/guide/components/",
"/guide/components/alerts/",
"/guide/components/buttons/",
+ "/guide/components/file-upload/",
"/guide/components/info-tooltip/",
"/guide/components/page-section/",
"/guide/components/page-title/",
diff --git a/docs/guide/components/file-upload/formfile.png b/docs/guide/components/file-upload/formfile.png
new file mode 100644
index 00000000..14bcf217
--- /dev/null
+++ b/docs/guide/components/file-upload/formfile.png
Binary files differ
diff --git a/docs/guide/components/file-upload/readme.md b/docs/guide/components/file-upload/readme.md
new file mode 100644
index 00000000..49945308
--- /dev/null
+++ b/docs/guide/components/file-upload/readme.md
@@ -0,0 +1,28 @@
+# FormFile
+
+`FormFile` is a custom component wrapper around the Bootstrap-vue Form File component. The purpose of this component is to upload files to the BMC.
+
+To use this component:
+1. Import it into the single file component (SFC)
+2. Add the `<form-file />` tag
+3. Add the optional `id` , `disabled`, `accept` and `state` prop as required
+
+[Learn more about the Bootstrap-vue Form File component](https://bootstrap-vue.org/docs/components/form-file)
+### Optional properties
+
+- `id`- Used to set the `id` attribute on the rendered content, and used as the base to generate any additional element IDs as needed
+- `disabled` - When set to `true`, disables the component's functionality and places it in a disabled state
+- `accept` - Set value to specify which file types to allow
+- `state` - Controls the validation state appearance of the component. `true` for valid, `false` for invalid, or `null` for no validation state
+
+## Example of form file
+
+```vue
+<form-file
+ id="image-file"
+ accept=".tar"
+ >
+</form-file>
+```
+
+![Formfile example in firmware](./formfile.png)