From 0931da1117b1999b71dd37ddd2c7e640f12b7d2a Mon Sep 17 00:00:00 2001 From: Patrizio Bekerle <patrizio@bekerle.com> Date: Tue, 8 Jun 2021 09:24:36 +0200 Subject: [PATCH] Add css variable documentation and bump versions --- packages/common/README.md | 7 +++++++ packages/common/package.json | 2 +- packages/file-handling/README.md | 11 ++++++++++- packages/file-handling/package.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/packages/common/README.md b/packages/common/README.md index 70e9ac52..212f20cb 100644 --- a/packages/common/README.md +++ b/packages/common/README.md @@ -13,3 +13,10 @@ For valid icon names see: [LineIcons](https://lineicons.com/icons/) ```html <dbp-icon color="orange" name="menu-down"></dbp-icon> ``` + +### Exposed CSS variables + +Variables like `--dbp-override-icon-<icon-name>` can be used to override the icons. + +Example CSS: `html { --dbp-override-icon-cloud: url(/icons/cloud.svg); }` + diff --git a/packages/common/package.json b/packages/common/package.json index 77b7e765..d9519526 100644 --- a/packages/common/package.json +++ b/packages/common/package.json @@ -1,7 +1,7 @@ { "name": "@dbp-toolkit/common", "homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/common", - "version": "0.2.3", + "version": "0.2.4", "module": "index.js", "license": "LGPL-2.1-or-later", "repository": { diff --git a/packages/file-handling/README.md b/packages/file-handling/README.md index 0521df16..50a9811e 100644 --- a/packages/file-handling/README.md +++ b/packages/file-handling/README.md @@ -104,11 +104,15 @@ This event is sent if a file was selected. This event is sent if multiple files are selected. #### `dbp-nextcloud-file-picker-number-files` + This event is sent from nextcloudfilepicker and is send when files are picked and sends the number of selected files +**Payload**: `{'file': File}` where [File](https://developer.mozilla.org/en-US/docs/Web/API/File) is the binary file that was selected +### Exposed CSS variables -**Payload**: `{'file': File}` where [File](https://developer.mozilla.org/en-US/docs/Web/API/File) is the binary file that was selected +- `--dbp-override-image-nextcloud` is used to override the cloud image on the connection screen + - example CSS: `html { --dbp-override-image-nextcloud: url(/icons/nextcloud.svg); }` ## FileSink @@ -162,6 +166,11 @@ The component emits a `dbp-set-property` event for the attribute `initial-file-h - if the property is set the dialog opens - example: `document.querySelector("dbp-file-sink").files = [file]` where `file` is your File object +### Exposed CSS variables + +- `--dbp-override-image-nextcloud` is used to override the cloud image on the connection screen + - example CSS: `html { --dbp-override-image-nextcloud: url(/icons/nextcloud.svg); }` + ## Local development ```bash diff --git a/packages/file-handling/package.json b/packages/file-handling/package.json index 809b8bec..c77e5862 100644 --- a/packages/file-handling/package.json +++ b/packages/file-handling/package.json @@ -1,7 +1,7 @@ { "name": "@dbp-toolkit/file-handling", "homepage": "https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling", - "version": "0.2.3", + "version": "0.2.4", "main": "src/index.js", "license": "LGPL-2.1-or-later", "repository": { -- GitLab