Skip to content
Snippets Groups Projects
Commit d572f6dc authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Change styling (VPU/Apps/Signature#2)

parent cf599643
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ import VPULitElement from 'vpu-common/vpu-lit-element' ...@@ -6,6 +6,7 @@ import VPULitElement from 'vpu-common/vpu-lit-element'
import "vpu-common/vpu-mini-spinner.js"; import "vpu-common/vpu-mini-spinner.js";
import * as commonUtils from "vpu-common/utils"; import * as commonUtils from "vpu-common/utils";
import 'vpu-common/vpu-icon.js'; import 'vpu-common/vpu-icon.js';
import * as commonStyles from 'vpu-common/styles';
/** /**
* KnowledgeBaseWebPageElementView web component * KnowledgeBaseWebPageElementView web component
...@@ -193,33 +194,28 @@ class VPUFileUpload extends VPULitElement { ...@@ -193,33 +194,28 @@ class VPUFileUpload extends VPULitElement {
static get styles() { static get styles() {
// language=css // language=css
return css` return css`
${commonStyles.getButtonCSS()}
#dropArea { #dropArea {
border: var(--FUBorderWidth, 2px) var(--FUBorderStyle, dashed) var(--FUBBorderColor, #ccc); border: var(--FUBorderWidth, 2px) var(--FUBorderStyle, solid) var(--FUBBorderColor, black);
border-radius: var(--FUBorderRadius, 0); border-radius: var(--FUBorderRadius, 0);
width: var(--FUWidth, auto); width: var(--FUWidth, auto);
margin: var(--FUMargin, 0px); margin: var(--FUMargin, 0px);
padding: var(--FUPadding, 20px); padding: var(--FUPadding, 20px);
} }
#dropArea.highlight { #dropArea.highlight {
border-color: var(--FUBorderColorHighlight, purple); border-color: var(--FUBorderColorHighlight, purple);
} }
p { p {
margin-top: 0; margin-top: 0;
} }
.my-form { .my-form {
margin-bottom: 10px; margin-bottom: 10px;
} }
.button {
display: inline-block;
padding: 10px;
background: #ccc;
cursor: pointer;
border-radius: calc(var(--FUBorderRadius, 0)/2);
border: 1px solid #ccc;
}
.button:hover {
background: #ddd;
}
#fileElem { #fileElem {
display: none; display: none;
} }
...@@ -232,7 +228,7 @@ class VPUFileUpload extends VPULitElement { ...@@ -232,7 +228,7 @@ class VPUFileUpload extends VPULitElement {
<div class="my-form" title="${this.uploadInProgress ? i18n.t('upload-disabled-title') : ''}"> <div class="my-form" title="${this.uploadInProgress ? i18n.t('upload-disabled-title') : ''}">
<p>${this.text || i18n.t('intro')}</p> <p>${this.text || i18n.t('intro')}</p>
<input ?disabled="${this.uploadInProgress}" type="file" id="fileElem" multiple accept="${ifDefined(this.accept)}" name='file'> <input ?disabled="${this.uploadInProgress}" type="file" id="fileElem" multiple accept="${ifDefined(this.accept)}" name='file'>
<label class="button" for="fileElem"><vpu-icon style="display: ${this.uploadInProgress ? "inline-block" : "none"}" name="lock"></vpu-icon> ${this.buttonLabel || i18n.t('upload-label')}</label> <label class="button is-primary" for="fileElem"><vpu-icon style="display: ${this.uploadInProgress ? "inline-block" : "none"}" name="lock"></vpu-icon> ${this.buttonLabel || i18n.t('upload-label')}</label>
</div> </div>
</div> </div>
`; `;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment